mistagent 0.1.0
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/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/src/api/auth.d.ts +7 -0
- package/dist/src/api/auth.d.ts.map +1 -0
- package/dist/src/api/auth.js +16 -0
- package/dist/src/api/auth.js.map +1 -0
- package/dist/src/api/chat.d.ts +8 -0
- package/dist/src/api/chat.d.ts.map +1 -0
- package/dist/src/api/chat.js +14 -0
- package/dist/src/api/chat.js.map +1 -0
- package/dist/src/api/client.d.ts +22 -0
- package/dist/src/api/client.d.ts.map +1 -0
- package/dist/src/api/client.js +140 -0
- package/dist/src/api/client.js.map +1 -0
- package/dist/src/api/commands.d.ts +8 -0
- package/dist/src/api/commands.d.ts.map +1 -0
- package/dist/src/api/commands.js +13 -0
- package/dist/src/api/commands.js.map +1 -0
- package/dist/src/api/models.d.ts +9 -0
- package/dist/src/api/models.d.ts.map +1 -0
- package/dist/src/api/models.js +13 -0
- package/dist/src/api/models.js.map +1 -0
- package/dist/src/api/sessions.d.ts +25 -0
- package/dist/src/api/sessions.d.ts.map +1 -0
- package/dist/src/api/sessions.js +26 -0
- package/dist/src/api/sessions.js.map +1 -0
- package/dist/src/api/tools.d.ts +7 -0
- package/dist/src/api/tools.d.ts.map +1 -0
- package/dist/src/api/tools.js +8 -0
- package/dist/src/api/tools.js.map +1 -0
- package/dist/src/components/App.d.ts +22 -0
- package/dist/src/components/App.d.ts.map +1 -0
- package/dist/src/components/App.js +61 -0
- package/dist/src/components/App.js.map +1 -0
- package/dist/src/components/AppLayout.d.ts +8 -0
- package/dist/src/components/AppLayout.d.ts.map +1 -0
- package/dist/src/components/AppLayout.js +18 -0
- package/dist/src/components/AppLayout.js.map +1 -0
- package/dist/src/components/Composer.d.ts +8 -0
- package/dist/src/components/Composer.d.ts.map +1 -0
- package/dist/src/components/Composer.js +294 -0
- package/dist/src/components/Composer.js.map +1 -0
- package/dist/src/components/Footer.d.ts +10 -0
- package/dist/src/components/Footer.d.ts.map +1 -0
- package/dist/src/components/Footer.js +34 -0
- package/dist/src/components/Footer.js.map +1 -0
- package/dist/src/components/Header.d.ts +3 -0
- package/dist/src/components/Header.d.ts.map +1 -0
- package/dist/src/components/Header.js +99 -0
- package/dist/src/components/Header.js.map +1 -0
- package/dist/src/components/HistoryItemDisplay.d.ts +8 -0
- package/dist/src/components/HistoryItemDisplay.d.ts.map +1 -0
- package/dist/src/components/HistoryItemDisplay.js +32 -0
- package/dist/src/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/components/InputPrompt.d.ts +11 -0
- package/dist/src/components/InputPrompt.d.ts.map +1 -0
- package/dist/src/components/InputPrompt.js +12 -0
- package/dist/src/components/InputPrompt.js.map +1 -0
- package/dist/src/components/LoadingIndicator.d.ts +8 -0
- package/dist/src/components/LoadingIndicator.d.ts.map +1 -0
- package/dist/src/components/LoadingIndicator.js +17 -0
- package/dist/src/components/LoadingIndicator.js.map +1 -0
- package/dist/src/components/LoginPrompt.d.ts +8 -0
- package/dist/src/components/LoginPrompt.d.ts.map +1 -0
- package/dist/src/components/LoginPrompt.js +76 -0
- package/dist/src/components/LoginPrompt.js.map +1 -0
- package/dist/src/components/MainContent.d.ts +3 -0
- package/dist/src/components/MainContent.d.ts.map +1 -0
- package/dist/src/components/MainContent.js +22 -0
- package/dist/src/components/MainContent.js.map +1 -0
- package/dist/src/components/ModelPicker.d.ts +3 -0
- package/dist/src/components/ModelPicker.d.ts.map +1 -0
- package/dist/src/components/ModelPicker.js +119 -0
- package/dist/src/components/ModelPicker.js.map +1 -0
- package/dist/src/components/MultiLineInput.d.ts +19 -0
- package/dist/src/components/MultiLineInput.d.ts.map +1 -0
- package/dist/src/components/MultiLineInput.js +108 -0
- package/dist/src/components/MultiLineInput.js.map +1 -0
- package/dist/src/components/SessionPicker.d.ts +3 -0
- package/dist/src/components/SessionPicker.d.ts.map +1 -0
- package/dist/src/components/SessionPicker.js +131 -0
- package/dist/src/components/SessionPicker.js.map +1 -0
- package/dist/src/components/SuggestionsDisplay.d.ts +16 -0
- package/dist/src/components/SuggestionsDisplay.d.ts.map +1 -0
- package/dist/src/components/SuggestionsDisplay.js +34 -0
- package/dist/src/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/components/messages/AssistantMessage.d.ts +8 -0
- package/dist/src/components/messages/AssistantMessage.d.ts.map +1 -0
- package/dist/src/components/messages/AssistantMessage.js +9 -0
- package/dist/src/components/messages/AssistantMessage.js.map +1 -0
- package/dist/src/components/messages/CommandResult.d.ts +8 -0
- package/dist/src/components/messages/CommandResult.d.ts.map +1 -0
- package/dist/src/components/messages/CommandResult.js +7 -0
- package/dist/src/components/messages/CommandResult.js.map +1 -0
- package/dist/src/components/messages/ErrorMessage.d.ts +7 -0
- package/dist/src/components/messages/ErrorMessage.d.ts.map +1 -0
- package/dist/src/components/messages/ErrorMessage.js +7 -0
- package/dist/src/components/messages/ErrorMessage.js.map +1 -0
- package/dist/src/components/messages/InfoMessage.d.ts +9 -0
- package/dist/src/components/messages/InfoMessage.d.ts.map +1 -0
- package/dist/src/components/messages/InfoMessage.js +8 -0
- package/dist/src/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/components/messages/ModelMessage.d.ts +8 -0
- package/dist/src/components/messages/ModelMessage.d.ts.map +1 -0
- package/dist/src/components/messages/ModelMessage.js +7 -0
- package/dist/src/components/messages/ModelMessage.js.map +1 -0
- package/dist/src/components/messages/SessionMessage.d.ts +8 -0
- package/dist/src/components/messages/SessionMessage.d.ts.map +1 -0
- package/dist/src/components/messages/SessionMessage.js +12 -0
- package/dist/src/components/messages/SessionMessage.js.map +1 -0
- package/dist/src/components/messages/ToolCallMessage.d.ts +9 -0
- package/dist/src/components/messages/ToolCallMessage.d.ts.map +1 -0
- package/dist/src/components/messages/ToolCallMessage.js +14 -0
- package/dist/src/components/messages/ToolCallMessage.js.map +1 -0
- package/dist/src/components/messages/UserMessage.d.ts +7 -0
- package/dist/src/components/messages/UserMessage.d.ts.map +1 -0
- package/dist/src/components/messages/UserMessage.js +9 -0
- package/dist/src/components/messages/UserMessage.js.map +1 -0
- package/dist/src/components/shared/HorizontalLine.d.ts +11 -0
- package/dist/src/components/shared/HorizontalLine.d.ts.map +1 -0
- package/dist/src/components/shared/HorizontalLine.js +10 -0
- package/dist/src/components/shared/HorizontalLine.js.map +1 -0
- package/dist/src/components/shared/MarkdownRenderer.d.ts +7 -0
- package/dist/src/components/shared/MarkdownRenderer.d.ts.map +1 -0
- package/dist/src/components/shared/MarkdownRenderer.js +33 -0
- package/dist/src/components/shared/MarkdownRenderer.js.map +1 -0
- package/dist/src/components/shared/Spinner.d.ts +8 -0
- package/dist/src/components/shared/Spinner.d.ts.map +1 -0
- package/dist/src/components/shared/Spinner.js +7 -0
- package/dist/src/components/shared/Spinner.js.map +1 -0
- package/dist/src/components/shared/TextInput.d.ts +10 -0
- package/dist/src/components/shared/TextInput.d.ts.map +1 -0
- package/dist/src/components/shared/TextInput.js +110 -0
- package/dist/src/components/shared/TextInput.js.map +1 -0
- package/dist/src/contexts/AppContext.d.ts +21 -0
- package/dist/src/contexts/AppContext.d.ts.map +1 -0
- package/dist/src/contexts/AppContext.js +16 -0
- package/dist/src/contexts/AppContext.js.map +1 -0
- package/dist/src/contexts/ChatContext.d.ts +68 -0
- package/dist/src/contexts/ChatContext.d.ts.map +1 -0
- package/dist/src/contexts/ChatContext.js +158 -0
- package/dist/src/contexts/ChatContext.js.map +1 -0
- package/dist/src/contexts/KeypressContext.d.ts +47 -0
- package/dist/src/contexts/KeypressContext.d.ts.map +1 -0
- package/dist/src/contexts/KeypressContext.js +792 -0
- package/dist/src/contexts/KeypressContext.js.map +1 -0
- package/dist/src/contexts/ModelContext.d.ts +20 -0
- package/dist/src/contexts/ModelContext.d.ts.map +1 -0
- package/dist/src/contexts/ModelContext.js +42 -0
- package/dist/src/contexts/ModelContext.js.map +1 -0
- package/dist/src/contexts/PasteContext.d.ts +8 -0
- package/dist/src/contexts/PasteContext.d.ts.map +1 -0
- package/dist/src/contexts/PasteContext.js +12 -0
- package/dist/src/contexts/PasteContext.js.map +1 -0
- package/dist/src/contexts/SessionContext.d.ts +19 -0
- package/dist/src/contexts/SessionContext.d.ts.map +1 -0
- package/dist/src/contexts/SessionContext.js +56 -0
- package/dist/src/contexts/SessionContext.js.map +1 -0
- package/dist/src/contexts/UIContext.d.ts +15 -0
- package/dist/src/contexts/UIContext.d.ts.map +1 -0
- package/dist/src/contexts/UIContext.js +16 -0
- package/dist/src/contexts/UIContext.js.map +1 -0
- package/dist/src/hooks/useChat.d.ts +11 -0
- package/dist/src/hooks/useChat.d.ts.map +1 -0
- package/dist/src/hooks/useChat.js +146 -0
- package/dist/src/hooks/useChat.js.map +1 -0
- package/dist/src/hooks/useFileCompletion.d.ts +8 -0
- package/dist/src/hooks/useFileCompletion.d.ts.map +1 -0
- package/dist/src/hooks/useFileCompletion.js +75 -0
- package/dist/src/hooks/useFileCompletion.js.map +1 -0
- package/dist/src/hooks/useInputHistory.d.ts +6 -0
- package/dist/src/hooks/useInputHistory.d.ts.map +1 -0
- package/dist/src/hooks/useInputHistory.js +46 -0
- package/dist/src/hooks/useInputHistory.js.map +1 -0
- package/dist/src/hooks/useKeypress.d.ts +16 -0
- package/dist/src/hooks/useKeypress.d.ts.map +1 -0
- package/dist/src/hooks/useKeypress.js +23 -0
- package/dist/src/hooks/useKeypress.js.map +1 -0
- package/dist/src/hooks/useLoadingIndicator.d.ts +5 -0
- package/dist/src/hooks/useLoadingIndicator.d.ts.map +1 -0
- package/dist/src/hooks/useLoadingIndicator.js +31 -0
- package/dist/src/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/hooks/useMultiLineInput.d.ts +37 -0
- package/dist/src/hooks/useMultiLineInput.d.ts.map +1 -0
- package/dist/src/hooks/useMultiLineInput.js +202 -0
- package/dist/src/hooks/useMultiLineInput.js.map +1 -0
- package/dist/src/hooks/usePasteBuffer.d.ts +10 -0
- package/dist/src/hooks/usePasteBuffer.d.ts.map +1 -0
- package/dist/src/hooks/usePasteBuffer.js +90 -0
- package/dist/src/hooks/usePasteBuffer.js.map +1 -0
- package/dist/src/hooks/useSlashCommand.d.ts +6 -0
- package/dist/src/hooks/useSlashCommand.d.ts.map +1 -0
- package/dist/src/hooks/useSlashCommand.js +198 -0
- package/dist/src/hooks/useSlashCommand.js.map +1 -0
- package/dist/src/hooks/useStdinInterceptor.d.ts +2 -0
- package/dist/src/hooks/useStdinInterceptor.d.ts.map +1 -0
- package/dist/src/hooks/useStdinInterceptor.js +85 -0
- package/dist/src/hooks/useStdinInterceptor.js.map +1 -0
- package/dist/src/hooks/useSymbolCompletion.d.ts +10 -0
- package/dist/src/hooks/useSymbolCompletion.d.ts.map +1 -0
- package/dist/src/hooks/useSymbolCompletion.js +65 -0
- package/dist/src/hooks/useSymbolCompletion.js.map +1 -0
- package/dist/src/hooks/useTextBuffer.d.ts +37 -0
- package/dist/src/hooks/useTextBuffer.d.ts.map +1 -0
- package/dist/src/hooks/useTextBuffer.js +627 -0
- package/dist/src/hooks/useTextBuffer.js.map +1 -0
- package/dist/src/main.d.ts +2 -0
- package/dist/src/main.d.ts.map +1 -0
- package/dist/src/main.js +152 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/tools/code-analyzer/config/ignore-service.d.ts +2 -0
- package/dist/src/tools/code-analyzer/config/ignore-service.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/config/ignore-service.js +209 -0
- package/dist/src/tools/code-analyzer/config/ignore-service.js.map +1 -0
- package/dist/src/tools/code-analyzer/config/supported-languages.d.ts +13 -0
- package/dist/src/tools/code-analyzer/config/supported-languages.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/config/supported-languages.js +17 -0
- package/dist/src/tools/code-analyzer/config/supported-languages.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/graph/graph.d.ts +3 -0
- package/dist/src/tools/code-analyzer/core/graph/graph.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/graph/graph.js +67 -0
- package/dist/src/tools/code-analyzer/core/graph/graph.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/graph/types.d.ts +62 -0
- package/dist/src/tools/code-analyzer/core/graph/types.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/graph/types.js +2 -0
- package/dist/src/tools/code-analyzer/core/graph/types.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/ast-cache.d.ts +12 -0
- package/dist/src/tools/code-analyzer/core/ingestion/ast-cache.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/ast-cache.js +35 -0
- package/dist/src/tools/code-analyzer/core/ingestion/ast-cache.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/call-processor.d.ts +16 -0
- package/dist/src/tools/code-analyzer/core/ingestion/call-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/call-processor.js +328 -0
- package/dist/src/tools/code-analyzer/core/ingestion/call-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/community-processor.d.ts +40 -0
- package/dist/src/tools/code-analyzer/core/ingestion/community-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/community-processor.js +328 -0
- package/dist/src/tools/code-analyzer/core/ingestion/community-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/entry-point-scoring.d.ts +40 -0
- package/dist/src/tools/code-analyzer/core/ingestion/entry-point-scoring.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/entry-point-scoring.js +236 -0
- package/dist/src/tools/code-analyzer/core/ingestion/entry-point-scoring.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/filesystem-walker.d.ts +29 -0
- package/dist/src/tools/code-analyzer/core/ingestion/filesystem-walker.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/filesystem-walker.js +81 -0
- package/dist/src/tools/code-analyzer/core/ingestion/filesystem-walker.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/framework-detection.d.ts +39 -0
- package/dist/src/tools/code-analyzer/core/ingestion/framework-detection.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/framework-detection.js +184 -0
- package/dist/src/tools/code-analyzer/core/ingestion/framework-detection.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/heritage-processor.d.ts +21 -0
- package/dist/src/tools/code-analyzer/core/ingestion/heritage-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/heritage-processor.js +198 -0
- package/dist/src/tools/code-analyzer/core/ingestion/heritage-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/import-processor.d.ts +39 -0
- package/dist/src/tools/code-analyzer/core/ingestion/import-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/import-processor.js +791 -0
- package/dist/src/tools/code-analyzer/core/ingestion/import-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/parsing-processor.d.ts +16 -0
- package/dist/src/tools/code-analyzer/core/ingestion/parsing-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/parsing-processor.js +296 -0
- package/dist/src/tools/code-analyzer/core/ingestion/parsing-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/pipeline.d.ts +3 -0
- package/dist/src/tools/code-analyzer/core/ingestion/pipeline.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/pipeline.js +309 -0
- package/dist/src/tools/code-analyzer/core/ingestion/pipeline.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/process-processor.d.ts +52 -0
- package/dist/src/tools/code-analyzer/core/ingestion/process-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/process-processor.js +310 -0
- package/dist/src/tools/code-analyzer/core/ingestion/process-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/structure-processor.d.ts +3 -0
- package/dist/src/tools/code-analyzer/core/ingestion/structure-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/structure-processor.js +37 -0
- package/dist/src/tools/code-analyzer/core/ingestion/structure-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/symbol-table.d.ts +34 -0
- package/dist/src/tools/code-analyzer/core/ingestion/symbol-table.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/symbol-table.js +39 -0
- package/dist/src/tools/code-analyzer/core/ingestion/symbol-table.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/tree-sitter-queries.d.ts +13 -0
- package/dist/src/tools/code-analyzer/core/ingestion/tree-sitter-queries.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/tree-sitter-queries.js +355 -0
- package/dist/src/tools/code-analyzer/core/ingestion/tree-sitter-queries.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/utils.d.ts +11 -0
- package/dist/src/tools/code-analyzer/core/ingestion/utils.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/utils.js +48 -0
- package/dist/src/tools/code-analyzer/core/ingestion/utils.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/parse-worker.d.ts +59 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/parse-worker.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/parse-worker.js +538 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/parse-worker.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/worker-pool.d.ts +17 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/worker-pool.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/worker-pool.js +121 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/worker-pool.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/tree-sitter/parser-loader.d.ts +5 -0
- package/dist/src/tools/code-analyzer/core/tree-sitter/parser-loader.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/tree-sitter/parser-loader.js +45 -0
- package/dist/src/tools/code-analyzer/core/tree-sitter/parser-loader.js.map +1 -0
- package/dist/src/tools/code-analyzer/index.d.ts +17 -0
- package/dist/src/tools/code-analyzer/index.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/index.js +15 -0
- package/dist/src/tools/code-analyzer/index.js.map +1 -0
- package/dist/src/tools/code-analyzer/lib/utils.d.ts +2 -0
- package/dist/src/tools/code-analyzer/lib/utils.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/lib/utils.js +4 -0
- package/dist/src/tools/code-analyzer/lib/utils.js.map +1 -0
- package/dist/src/tools/code-analyzer/types/pipeline.d.ts +33 -0
- package/dist/src/tools/code-analyzer/types/pipeline.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/types/pipeline.js +19 -0
- package/dist/src/tools/code-analyzer/types/pipeline.js.map +1 -0
- package/dist/src/types/api.d.ts +124 -0
- package/dist/src/types/api.d.ts.map +1 -0
- package/dist/src/types/api.js +3 -0
- package/dist/src/types/api.js.map +1 -0
- package/dist/src/types/history.d.ts +49 -0
- package/dist/src/types/history.d.ts.map +1 -0
- package/dist/src/types/history.js +10 -0
- package/dist/src/types/history.js.map +1 -0
- package/dist/src/utils/colors.d.ts +40 -0
- package/dist/src/utils/colors.d.ts.map +1 -0
- package/dist/src/utils/colors.js +48 -0
- package/dist/src/utils/colors.js.map +1 -0
- package/dist/src/utils/config.d.ts +13 -0
- package/dist/src/utils/config.d.ts.map +1 -0
- package/dist/src/utils/config.js +74 -0
- package/dist/src/utils/config.js.map +1 -0
- package/dist/src/utils/constants.d.ts +8 -0
- package/dist/src/utils/constants.d.ts.map +1 -0
- package/dist/src/utils/constants.js +48 -0
- package/dist/src/utils/constants.js.map +1 -0
- package/dist/src/utils/fileRef.d.ts +26 -0
- package/dist/src/utils/fileRef.d.ts.map +1 -0
- package/dist/src/utils/fileRef.js +305 -0
- package/dist/src/utils/fileRef.js.map +1 -0
- package/dist/src/utils/formatters.d.ts +4 -0
- package/dist/src/utils/formatters.d.ts.map +1 -0
- package/dist/src/utils/formatters.js +18 -0
- package/dist/src/utils/formatters.js.map +1 -0
- package/dist/src/utils/pasteTransform.d.ts +37 -0
- package/dist/src/utils/pasteTransform.d.ts.map +1 -0
- package/dist/src/utils/pasteTransform.js +161 -0
- package/dist/src/utils/pasteTransform.js.map +1 -0
- package/dist/src/utils/pasteUtils.d.ts +7 -0
- package/dist/src/utils/pasteUtils.d.ts.map +1 -0
- package/dist/src/utils/pasteUtils.js +33 -0
- package/dist/src/utils/pasteUtils.js.map +1 -0
- package/dist/src/utils/textUtils.d.ts +25 -0
- package/dist/src/utils/textUtils.d.ts.map +1 -0
- package/dist/src/utils/textUtils.js +107 -0
- package/dist/src/utils/textUtils.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { createKnowledgeGraph } from '../graph/graph.js';
|
|
2
|
+
import { processStructure } from './structure-processor.js';
|
|
3
|
+
import { processParsing } from './parsing-processor.js';
|
|
4
|
+
import { processImports, processImportsFromExtracted, createImportMap, buildImportResolutionContext } from './import-processor.js';
|
|
5
|
+
import { processCalls, processCallsFromExtracted } from './call-processor.js';
|
|
6
|
+
import { processHeritage, processHeritageFromExtracted } from './heritage-processor.js';
|
|
7
|
+
import { processCommunities } from './community-processor.js';
|
|
8
|
+
import { processProcesses } from './process-processor.js';
|
|
9
|
+
import { createSymbolTable } from './symbol-table.js';
|
|
10
|
+
import { createASTCache } from './ast-cache.js';
|
|
11
|
+
import { walkRepositoryPaths, readFileContents } from './filesystem-walker.js';
|
|
12
|
+
import { getLanguageFromFilename } from './utils.js';
|
|
13
|
+
import { createWorkerPool } from './workers/worker-pool.js';
|
|
14
|
+
const isDev = process.env.NODE_ENV === 'development';
|
|
15
|
+
/** Max bytes of source content to load per parse chunk. Each chunk's source +
|
|
16
|
+
* parsed ASTs + extracted records + worker serialization overhead all live in
|
|
17
|
+
* memory simultaneously, so this must be conservative. 20MB source ≈ 200-400MB
|
|
18
|
+
* peak working memory per chunk after parse expansion. */
|
|
19
|
+
const CHUNK_BYTE_BUDGET = 20 * 1024 * 1024; // 20MB
|
|
20
|
+
/** Max AST trees to keep in LRU cache */
|
|
21
|
+
const AST_CACHE_CAP = 50;
|
|
22
|
+
export const runPipelineFromRepo = async (repoPath, onProgress) => {
|
|
23
|
+
const graph = createKnowledgeGraph();
|
|
24
|
+
const symbolTable = createSymbolTable();
|
|
25
|
+
let astCache = createASTCache(AST_CACHE_CAP);
|
|
26
|
+
const importMap = createImportMap();
|
|
27
|
+
const cleanup = () => {
|
|
28
|
+
astCache.clear();
|
|
29
|
+
symbolTable.clear();
|
|
30
|
+
};
|
|
31
|
+
try {
|
|
32
|
+
// ── Phase 1: Scan paths only (no content read) ─────────────────────
|
|
33
|
+
onProgress({
|
|
34
|
+
phase: 'extracting',
|
|
35
|
+
percent: 0,
|
|
36
|
+
message: 'Scanning repository...',
|
|
37
|
+
});
|
|
38
|
+
const scannedFiles = await walkRepositoryPaths(repoPath, (current, total, filePath) => {
|
|
39
|
+
const scanProgress = Math.round((current / total) * 15);
|
|
40
|
+
onProgress({
|
|
41
|
+
phase: 'extracting',
|
|
42
|
+
percent: scanProgress,
|
|
43
|
+
message: 'Scanning repository...',
|
|
44
|
+
detail: filePath,
|
|
45
|
+
stats: { filesProcessed: current, totalFiles: total, nodesCreated: graph.nodeCount },
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
const totalFiles = scannedFiles.length;
|
|
49
|
+
onProgress({
|
|
50
|
+
phase: 'extracting',
|
|
51
|
+
percent: 15,
|
|
52
|
+
message: 'Repository scanned successfully',
|
|
53
|
+
stats: { filesProcessed: totalFiles, totalFiles, nodesCreated: graph.nodeCount },
|
|
54
|
+
});
|
|
55
|
+
// ── Phase 2: Structure (paths only — no content needed) ────────────
|
|
56
|
+
onProgress({
|
|
57
|
+
phase: 'structure',
|
|
58
|
+
percent: 15,
|
|
59
|
+
message: 'Analyzing project structure...',
|
|
60
|
+
stats: { filesProcessed: 0, totalFiles, nodesCreated: graph.nodeCount },
|
|
61
|
+
});
|
|
62
|
+
const allPaths = scannedFiles.map(f => f.path);
|
|
63
|
+
processStructure(graph, allPaths);
|
|
64
|
+
onProgress({
|
|
65
|
+
phase: 'structure',
|
|
66
|
+
percent: 20,
|
|
67
|
+
message: 'Project structure analyzed',
|
|
68
|
+
stats: { filesProcessed: totalFiles, totalFiles, nodesCreated: graph.nodeCount },
|
|
69
|
+
});
|
|
70
|
+
// ── Phase 3+4: Chunked read + parse ────────────────────────────────
|
|
71
|
+
// Group parseable files into byte-budget chunks so only ~20MB of source
|
|
72
|
+
// is in memory at a time. Each chunk is: read → parse → extract → free.
|
|
73
|
+
const parseableScanned = scannedFiles.filter(f => getLanguageFromFilename(f.path));
|
|
74
|
+
const totalParseable = parseableScanned.length;
|
|
75
|
+
// Build byte-budget chunks
|
|
76
|
+
const chunks = [];
|
|
77
|
+
let currentChunk = [];
|
|
78
|
+
let currentBytes = 0;
|
|
79
|
+
for (const file of parseableScanned) {
|
|
80
|
+
if (currentChunk.length > 0 && currentBytes + file.size > CHUNK_BYTE_BUDGET) {
|
|
81
|
+
chunks.push(currentChunk);
|
|
82
|
+
currentChunk = [];
|
|
83
|
+
currentBytes = 0;
|
|
84
|
+
}
|
|
85
|
+
currentChunk.push(file.path);
|
|
86
|
+
currentBytes += file.size;
|
|
87
|
+
}
|
|
88
|
+
if (currentChunk.length > 0)
|
|
89
|
+
chunks.push(currentChunk);
|
|
90
|
+
const numChunks = chunks.length;
|
|
91
|
+
if (isDev) {
|
|
92
|
+
const totalMB = parseableScanned.reduce((s, f) => s + f.size, 0) / (1024 * 1024);
|
|
93
|
+
console.log(`📂 Scan: ${totalFiles} paths, ${totalParseable} parseable (${totalMB.toFixed(0)}MB), ${numChunks} chunks @ ${CHUNK_BYTE_BUDGET / (1024 * 1024)}MB budget`);
|
|
94
|
+
}
|
|
95
|
+
onProgress({
|
|
96
|
+
phase: 'parsing',
|
|
97
|
+
percent: 20,
|
|
98
|
+
message: `Parsing ${totalParseable} files in ${numChunks} chunk${numChunks !== 1 ? 's' : ''}...`,
|
|
99
|
+
stats: { filesProcessed: 0, totalFiles: totalParseable, nodesCreated: graph.nodeCount },
|
|
100
|
+
});
|
|
101
|
+
// Create worker pool once, reuse across chunks
|
|
102
|
+
let workerPool;
|
|
103
|
+
try {
|
|
104
|
+
const workerUrl = new URL('./workers/parse-worker.js', import.meta.url);
|
|
105
|
+
// Verify worker file exists before spawning threads (tsx dev mode
|
|
106
|
+
// resolves import.meta.url to the .ts source dir where no .js exists)
|
|
107
|
+
const { existsSync } = await import('node:fs');
|
|
108
|
+
const { fileURLToPath } = await import('node:url');
|
|
109
|
+
if (existsSync(fileURLToPath(workerUrl))) {
|
|
110
|
+
workerPool = createWorkerPool(workerUrl);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
// Worker pool creation failed — sequential fallback
|
|
115
|
+
}
|
|
116
|
+
let filesParsedSoFar = 0;
|
|
117
|
+
// AST cache sized for one chunk (sequential fallback uses it for import/call/heritage)
|
|
118
|
+
const maxChunkFiles = chunks.reduce((max, c) => Math.max(max, c.length), 0);
|
|
119
|
+
astCache = createASTCache(maxChunkFiles);
|
|
120
|
+
// Build import resolution context once — suffix index, file lists, resolve cache.
|
|
121
|
+
// Reused across all chunks to avoid rebuilding O(files × path_depth) structures.
|
|
122
|
+
const importCtx = buildImportResolutionContext(allPaths);
|
|
123
|
+
const allPathObjects = allPaths.map(p => ({ path: p }));
|
|
124
|
+
// Single-pass: parse + resolve imports/calls/heritage per chunk.
|
|
125
|
+
// Calls/heritage use the symbol table built so far (symbols from earlier chunks
|
|
126
|
+
// are already registered). This trades ~5% cross-chunk resolution accuracy for
|
|
127
|
+
// 200-400MB less memory — critical for Linux-kernel-scale repos.
|
|
128
|
+
const sequentialChunkPaths = [];
|
|
129
|
+
try {
|
|
130
|
+
for (let chunkIdx = 0; chunkIdx < numChunks; chunkIdx++) {
|
|
131
|
+
const chunkPaths = chunks[chunkIdx];
|
|
132
|
+
// Read content for this chunk only
|
|
133
|
+
const chunkContents = await readFileContents(repoPath, chunkPaths);
|
|
134
|
+
const chunkFiles = chunkPaths
|
|
135
|
+
.filter(p => chunkContents.has(p))
|
|
136
|
+
.map(p => ({ path: p, content: chunkContents.get(p) }));
|
|
137
|
+
// Parse this chunk (workers or sequential fallback)
|
|
138
|
+
const chunkWorkerData = await processParsing(graph, chunkFiles, symbolTable, astCache, (current, _total, filePath) => {
|
|
139
|
+
const globalCurrent = filesParsedSoFar + current;
|
|
140
|
+
const parsingProgress = 20 + ((globalCurrent / totalParseable) * 62);
|
|
141
|
+
onProgress({
|
|
142
|
+
phase: 'parsing',
|
|
143
|
+
percent: Math.round(parsingProgress),
|
|
144
|
+
message: `Parsing chunk ${chunkIdx + 1}/${numChunks}...`,
|
|
145
|
+
detail: filePath,
|
|
146
|
+
stats: { filesProcessed: globalCurrent, totalFiles: totalParseable, nodesCreated: graph.nodeCount },
|
|
147
|
+
});
|
|
148
|
+
}, workerPool);
|
|
149
|
+
if (chunkWorkerData) {
|
|
150
|
+
// Imports
|
|
151
|
+
await processImportsFromExtracted(graph, allPathObjects, chunkWorkerData.imports, importMap, undefined, repoPath, importCtx);
|
|
152
|
+
// Calls — resolve immediately, then free the array
|
|
153
|
+
if (chunkWorkerData.calls.length > 0) {
|
|
154
|
+
await processCallsFromExtracted(graph, chunkWorkerData.calls, symbolTable, importMap);
|
|
155
|
+
}
|
|
156
|
+
// Heritage — resolve immediately, then free
|
|
157
|
+
if (chunkWorkerData.heritage.length > 0) {
|
|
158
|
+
await processHeritageFromExtracted(graph, chunkWorkerData.heritage, symbolTable);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
await processImports(graph, chunkFiles, astCache, importMap, undefined, repoPath, allPaths);
|
|
163
|
+
sequentialChunkPaths.push(chunkPaths);
|
|
164
|
+
}
|
|
165
|
+
filesParsedSoFar += chunkFiles.length;
|
|
166
|
+
// Clear AST cache between chunks to free memory
|
|
167
|
+
astCache.clear();
|
|
168
|
+
// chunkContents + chunkFiles + chunkWorkerData go out of scope → GC reclaims
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
await workerPool?.terminate();
|
|
173
|
+
}
|
|
174
|
+
// Sequential fallback chunks: re-read source for call/heritage resolution
|
|
175
|
+
for (const chunkPaths of sequentialChunkPaths) {
|
|
176
|
+
const chunkContents = await readFileContents(repoPath, chunkPaths);
|
|
177
|
+
const chunkFiles = chunkPaths
|
|
178
|
+
.filter(p => chunkContents.has(p))
|
|
179
|
+
.map(p => ({ path: p, content: chunkContents.get(p) }));
|
|
180
|
+
astCache = createASTCache(chunkFiles.length);
|
|
181
|
+
await processCalls(graph, chunkFiles, astCache, symbolTable, importMap);
|
|
182
|
+
await processHeritage(graph, chunkFiles, astCache, symbolTable);
|
|
183
|
+
astCache.clear();
|
|
184
|
+
}
|
|
185
|
+
// Free import resolution context — suffix index + resolve cache no longer needed
|
|
186
|
+
// (allPathObjects and importCtx hold ~94MB+ for large repos)
|
|
187
|
+
allPathObjects.length = 0;
|
|
188
|
+
importCtx.resolveCache.clear();
|
|
189
|
+
importCtx.suffixIndex = null;
|
|
190
|
+
importCtx.normalizedFileList = null;
|
|
191
|
+
if (isDev) {
|
|
192
|
+
let importsCount = 0;
|
|
193
|
+
for (const r of graph.iterRelationships()) {
|
|
194
|
+
if (r.type === 'IMPORTS')
|
|
195
|
+
importsCount++;
|
|
196
|
+
}
|
|
197
|
+
console.log(`📊 Pipeline: graph has ${importsCount} IMPORTS, ${graph.relationshipCount} total relationships`);
|
|
198
|
+
}
|
|
199
|
+
// ── Phase 5: Communities ───────────────────────────────────────────
|
|
200
|
+
onProgress({
|
|
201
|
+
phase: 'communities',
|
|
202
|
+
percent: 82,
|
|
203
|
+
message: 'Detecting code communities...',
|
|
204
|
+
stats: { filesProcessed: totalFiles, totalFiles, nodesCreated: graph.nodeCount },
|
|
205
|
+
});
|
|
206
|
+
const communityResult = await processCommunities(graph, (message, progress) => {
|
|
207
|
+
const communityProgress = 82 + (progress * 0.10);
|
|
208
|
+
onProgress({
|
|
209
|
+
phase: 'communities',
|
|
210
|
+
percent: Math.round(communityProgress),
|
|
211
|
+
message,
|
|
212
|
+
stats: { filesProcessed: totalFiles, totalFiles, nodesCreated: graph.nodeCount },
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
if (isDev) {
|
|
216
|
+
console.log(`🏘️ Community detection: ${communityResult.stats.totalCommunities} communities found (modularity: ${communityResult.stats.modularity.toFixed(3)})`);
|
|
217
|
+
}
|
|
218
|
+
communityResult.communities.forEach(comm => {
|
|
219
|
+
graph.addNode({
|
|
220
|
+
id: comm.id,
|
|
221
|
+
label: 'Community',
|
|
222
|
+
properties: {
|
|
223
|
+
name: comm.label,
|
|
224
|
+
filePath: '',
|
|
225
|
+
heuristicLabel: comm.heuristicLabel,
|
|
226
|
+
cohesion: comm.cohesion,
|
|
227
|
+
symbolCount: comm.symbolCount,
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
communityResult.memberships.forEach(membership => {
|
|
232
|
+
graph.addRelationship({
|
|
233
|
+
id: `${membership.nodeId}_member_of_${membership.communityId}`,
|
|
234
|
+
type: 'MEMBER_OF',
|
|
235
|
+
sourceId: membership.nodeId,
|
|
236
|
+
targetId: membership.communityId,
|
|
237
|
+
confidence: 1.0,
|
|
238
|
+
reason: 'leiden-algorithm',
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
// ── Phase 6: Processes ─────────────────────────────────────────────
|
|
242
|
+
onProgress({
|
|
243
|
+
phase: 'processes',
|
|
244
|
+
percent: 94,
|
|
245
|
+
message: 'Detecting execution flows...',
|
|
246
|
+
stats: { filesProcessed: totalFiles, totalFiles, nodesCreated: graph.nodeCount },
|
|
247
|
+
});
|
|
248
|
+
let symbolCount = 0;
|
|
249
|
+
graph.forEachNode(n => { if (n.label !== 'File')
|
|
250
|
+
symbolCount++; });
|
|
251
|
+
const dynamicMaxProcesses = Math.max(20, Math.min(300, Math.round(symbolCount / 10)));
|
|
252
|
+
const processResult = await processProcesses(graph, communityResult.memberships, (message, progress) => {
|
|
253
|
+
const processProgress = 94 + (progress * 0.05);
|
|
254
|
+
onProgress({
|
|
255
|
+
phase: 'processes',
|
|
256
|
+
percent: Math.round(processProgress),
|
|
257
|
+
message,
|
|
258
|
+
stats: { filesProcessed: totalFiles, totalFiles, nodesCreated: graph.nodeCount },
|
|
259
|
+
});
|
|
260
|
+
}, { maxProcesses: dynamicMaxProcesses, minSteps: 3 });
|
|
261
|
+
if (isDev) {
|
|
262
|
+
console.log(`🔄 Process detection: ${processResult.stats.totalProcesses} processes found (${processResult.stats.crossCommunityCount} cross-community)`);
|
|
263
|
+
}
|
|
264
|
+
processResult.processes.forEach(proc => {
|
|
265
|
+
graph.addNode({
|
|
266
|
+
id: proc.id,
|
|
267
|
+
label: 'Process',
|
|
268
|
+
properties: {
|
|
269
|
+
name: proc.label,
|
|
270
|
+
filePath: '',
|
|
271
|
+
heuristicLabel: proc.heuristicLabel,
|
|
272
|
+
processType: proc.processType,
|
|
273
|
+
stepCount: proc.stepCount,
|
|
274
|
+
communities: proc.communities,
|
|
275
|
+
entryPointId: proc.entryPointId,
|
|
276
|
+
terminalId: proc.terminalId,
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
processResult.steps.forEach(step => {
|
|
281
|
+
graph.addRelationship({
|
|
282
|
+
id: `${step.nodeId}_step_${step.step}_${step.processId}`,
|
|
283
|
+
type: 'STEP_IN_PROCESS',
|
|
284
|
+
sourceId: step.nodeId,
|
|
285
|
+
targetId: step.processId,
|
|
286
|
+
confidence: 1.0,
|
|
287
|
+
reason: 'trace-detection',
|
|
288
|
+
step: step.step,
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
onProgress({
|
|
292
|
+
phase: 'complete',
|
|
293
|
+
percent: 100,
|
|
294
|
+
message: `Graph complete! ${communityResult.stats.totalCommunities} communities, ${processResult.stats.totalProcesses} processes detected.`,
|
|
295
|
+
stats: {
|
|
296
|
+
filesProcessed: totalFiles,
|
|
297
|
+
totalFiles,
|
|
298
|
+
nodesCreated: graph.nodeCount
|
|
299
|
+
},
|
|
300
|
+
});
|
|
301
|
+
astCache.clear();
|
|
302
|
+
return { graph, repoPath, totalFileCount: totalFiles, communityResult, processResult };
|
|
303
|
+
}
|
|
304
|
+
catch (error) {
|
|
305
|
+
cleanup();
|
|
306
|
+
throw error;
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
//# sourceMappingURL=pipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../../../../../src/tools/code-analyzer/core/ingestion/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACnI,OAAO,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,E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;gBACV,YAAY,EAAE,KAAK,CAAC,SAAS;aAC9B;SACF,CAAC,CAAC;QAEH,QAAQ,CAAC,KAAK,EAAE,CAAC;QAEjB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;IACzF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;QACV,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process Detection Processor
|
|
3
|
+
*
|
|
4
|
+
* Detects execution flows (Processes) in the code graph by:
|
|
5
|
+
* 1. Finding entry points (functions with no internal callers)
|
|
6
|
+
* 2. Tracing forward via CALLS edges (BFS)
|
|
7
|
+
* 3. Grouping and deduplicating similar paths
|
|
8
|
+
* 4. Labeling with heuristic names
|
|
9
|
+
*
|
|
10
|
+
* Processes help agents understand how features work through the codebase.
|
|
11
|
+
*/
|
|
12
|
+
import { KnowledgeGraph } from '../graph/types.js';
|
|
13
|
+
import { CommunityMembership } from './community-processor.js';
|
|
14
|
+
export interface ProcessDetectionConfig {
|
|
15
|
+
maxTraceDepth: number;
|
|
16
|
+
maxBranching: number;
|
|
17
|
+
maxProcesses: number;
|
|
18
|
+
minSteps: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ProcessNode {
|
|
21
|
+
id: string;
|
|
22
|
+
label: string;
|
|
23
|
+
heuristicLabel: string;
|
|
24
|
+
processType: 'intra_community' | 'cross_community';
|
|
25
|
+
stepCount: number;
|
|
26
|
+
communities: string[];
|
|
27
|
+
entryPointId: string;
|
|
28
|
+
terminalId: string;
|
|
29
|
+
trace: string[];
|
|
30
|
+
}
|
|
31
|
+
export interface ProcessStep {
|
|
32
|
+
nodeId: string;
|
|
33
|
+
processId: string;
|
|
34
|
+
step: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ProcessDetectionResult {
|
|
37
|
+
processes: ProcessNode[];
|
|
38
|
+
steps: ProcessStep[];
|
|
39
|
+
stats: {
|
|
40
|
+
totalProcesses: number;
|
|
41
|
+
crossCommunityCount: number;
|
|
42
|
+
avgStepCount: number;
|
|
43
|
+
entryPointsFound: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Detect processes (execution flows) in the knowledge graph
|
|
48
|
+
*
|
|
49
|
+
* This runs AFTER community detection, using CALLS edges to trace flows.
|
|
50
|
+
*/
|
|
51
|
+
export declare const processProcesses: (knowledgeGraph: KnowledgeGraph, memberships: CommunityMembership[], onProgress?: (message: string, progress: number) => void, config?: Partial<ProcessDetectionConfig>) => Promise<ProcessDetectionResult>;
|
|
52
|
+
//# sourceMappingURL=process-processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-processor.d.ts","sourceRoot":"","sources":["../../../../../../src/tools/code-analyzer/core/ingestion/process-processor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAA2C,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAS/D,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAaD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;C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