@crownpeak/dqm-react-component-dev-mcp 1.2.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/README.md +138 -0
- package/data/.env.example +22 -0
- package/data/.gitattributes +47 -0
- package/data/.glfrc.json +7 -0
- package/data/.husky/pre-commit +5 -0
- package/data/.nvmrc +1 -0
- package/data/CHANGELOG.md +75 -0
- package/data/CODE_OF_CONDUCT.md +129 -0
- package/data/CONTRIBUTING.md +203 -0
- package/data/DOCS-STRUCTURE.md +307 -0
- package/data/I18N.md +292 -0
- package/data/LICENSE +22 -0
- package/data/README.md +315 -0
- package/data/SECURITY.md +125 -0
- package/data/WIKI-DEPLOYMENT.md +348 -0
- package/data/docs/AI-FEATURES.md +610 -0
- package/data/docs/API-REFERENCE.md +1022 -0
- package/data/docs/AUTHENTICATION.md +301 -0
- package/data/docs/BACKEND-API.md +468 -0
- package/data/docs/DEVELOPMENT.md +375 -0
- package/data/docs/EXAMPLES.md +622 -0
- package/data/docs/MCP-SERVER.md +307 -0
- package/data/docs/MIGRATION-GUIDE.md +367 -0
- package/data/docs/NPM-PUBLISH.md +193 -0
- package/data/docs/QUICKSTART.md +206 -0
- package/data/docs/REDIS-SETUP.md +162 -0
- package/data/docs/SERVER.md +228 -0
- package/data/docs/TROUBLESHOOTING.md +657 -0
- package/data/docs/WIDGET-GUIDE.md +638 -0
- package/data/docs/WIKI-HOME.md +58 -0
- package/data/docs/WIKI-SIDEBAR.md +39 -0
- package/data/package.json +171 -0
- package/data/playwright.config.ts +64 -0
- package/data/probe/.cargo/config.toml +10 -0
- package/data/probe/.claude/commands/performance-review.md +15 -0
- package/data/probe/.clinerules +288 -0
- package/data/probe/.dockerignore +57 -0
- package/data/probe/.githooks/post-commit +11 -0
- package/data/probe/.githooks/pre-commit +99 -0
- package/data/probe/.githooks/pre-commit-vow +9 -0
- package/data/probe/.prompts/engineer.md +41 -0
- package/data/probe/.roomodes +28 -0
- package/data/probe/.windsurfrules +0 -0
- package/data/probe/BASH_TOOL_SUMMARY.md +148 -0
- package/data/probe/BENCHMARKING.md +256 -0
- package/data/probe/CLAUDE.md +226 -0
- package/data/probe/CODE_OF_CONDUCT.md +128 -0
- package/data/probe/CONTRIBUTING.md +193 -0
- package/data/probe/Cargo.toml +120 -0
- package/data/probe/Cross.toml +10 -0
- package/data/probe/DOCKER-README.md +224 -0
- package/data/probe/Dockerfile +32 -0
- package/data/probe/ENHANCED_DEBUG_TELEMETRY.md +188 -0
- package/data/probe/LICENSE +201 -0
- package/data/probe/Makefile +210 -0
- package/data/probe/README.md +824 -0
- package/data/probe/SECURITY.md +67 -0
- package/data/probe/WINDOWS-GUIDE.md +294 -0
- package/data/probe/benches/parsing_benchmarks.rs +370 -0
- package/data/probe/benches/search_benchmarks.rs +599 -0
- package/data/probe/benches/simd_benchmarks.rs +372 -0
- package/data/probe/benches/timing_benchmarks.rs +287 -0
- package/data/probe/build-windows.bat +229 -0
- package/data/probe/codex-config/config.toml +6 -0
- package/data/probe/docs/PERFORMANCE_OPTIMIZATION.md +161 -0
- package/data/probe/examples/cache_demo.rs +46 -0
- package/data/probe/examples/chat/.dockerignore +37 -0
- package/data/probe/examples/chat/ChatSessionManager.js +295 -0
- package/data/probe/examples/chat/Dockerfile +98 -0
- package/data/probe/examples/chat/LICENSE +201 -0
- package/data/probe/examples/chat/LOCAL_IMAGE_SUPPORT.md +195 -0
- package/data/probe/examples/chat/MCP_INTEGRATION.md +400 -0
- package/data/probe/examples/chat/README.md +338 -0
- package/data/probe/examples/chat/TRACING.md +226 -0
- package/data/probe/examples/chat/appTracer.js +968 -0
- package/data/probe/examples/chat/auth.js +76 -0
- package/data/probe/examples/chat/bin/probe-chat.js +13 -0
- package/data/probe/examples/chat/build.js +104 -0
- package/data/probe/examples/chat/cancelRequest.js +84 -0
- package/data/probe/examples/chat/demo-agentic-image-flow.js +88 -0
- package/data/probe/examples/chat/demo-local-images.js +128 -0
- package/data/probe/examples/chat/fileSpanExporter.js +181 -0
- package/data/probe/examples/chat/implement/README.md +228 -0
- package/data/probe/examples/chat/implement/backends/AiderBackend.js +750 -0
- package/data/probe/examples/chat/implement/backends/BaseBackend.js +276 -0
- package/data/probe/examples/chat/implement/backends/ClaudeCodeBackend.js +767 -0
- package/data/probe/examples/chat/implement/backends/MockBackend.js +237 -0
- package/data/probe/examples/chat/implement/backends/registry.js +85 -0
- package/data/probe/examples/chat/implement/core/BackendManager.js +567 -0
- package/data/probe/examples/chat/implement/core/ImplementTool.js +354 -0
- package/data/probe/examples/chat/implement/core/config.js +428 -0
- package/data/probe/examples/chat/implement/core/timeouts.js +58 -0
- package/data/probe/examples/chat/implement/core/utils.js +496 -0
- package/data/probe/examples/chat/implement/types/BackendTypes.js +126 -0
- package/data/probe/examples/chat/index.js +669 -0
- package/data/probe/examples/chat/mcpServer.js +341 -0
- package/data/probe/examples/chat/npm/LICENSE +15 -0
- package/data/probe/examples/chat/npm/README.md +168 -0
- package/data/probe/examples/chat/npm/bin/probe-chat.js +156 -0
- package/data/probe/examples/chat/npm/index.js +259 -0
- package/data/probe/examples/chat/npm/package.json +54 -0
- package/data/probe/examples/chat/package.json +102 -0
- package/data/probe/examples/chat/probeChat.js +456 -0
- package/data/probe/examples/chat/probeTool.js +491 -0
- package/data/probe/examples/chat/storage/JsonChatStorage.js +476 -0
- package/data/probe/examples/chat/telemetry.js +281 -0
- package/data/probe/examples/chat/test/integration/chatFlows.test.js +320 -0
- package/data/probe/examples/chat/test/integration/toolCalling.test.js +471 -0
- package/data/probe/examples/chat/test/mocks/mockLLMProvider.js +269 -0
- package/data/probe/examples/chat/test/test-backends.js +90 -0
- package/data/probe/examples/chat/test/testUtils.js +530 -0
- package/data/probe/examples/chat/test/unit/backendTimeout.test.js +161 -0
- package/data/probe/examples/chat/test/unit/packageFiles.test.js +120 -0
- package/data/probe/examples/chat/test/verify-tests.js +118 -0
- package/data/probe/examples/chat/test-agentic-image-loading.js +294 -0
- package/data/probe/examples/chat/test-ai-sdk-telemetry.js +204 -0
- package/data/probe/examples/chat/test-chat-tracing.js +38 -0
- package/data/probe/examples/chat/test-direct-function.js +49 -0
- package/data/probe/examples/chat/test-file-size-validation.js +103 -0
- package/data/probe/examples/chat/test-full-mcp-integration.js +258 -0
- package/data/probe/examples/chat/test-github-context.txt +12 -0
- package/data/probe/examples/chat/test-hierarchy.js +203 -0
- package/data/probe/examples/chat/test-image-spans.js +37 -0
- package/data/probe/examples/chat/test-local-image-reading.js +176 -0
- package/data/probe/examples/chat/test-mcp-integration.js +136 -0
- package/data/probe/examples/chat/test-mcp-probe-server.js +161 -0
- package/data/probe/examples/chat/test-mcp-with-ai.js +279 -0
- package/data/probe/examples/chat/test-multiple-allowed-dirs.js +111 -0
- package/data/probe/examples/chat/test-probe-mcp-server.js +110 -0
- package/data/probe/examples/chat/test-security-validation.js +145 -0
- package/data/probe/examples/chat/test-simple-tracing.js +32 -0
- package/data/probe/examples/chat/test-trace-verification.js +235 -0
- package/data/probe/examples/chat/test-tracing.js +114 -0
- package/data/probe/examples/chat/tokenCounter.js +419 -0
- package/data/probe/examples/chat/tokenUsageDisplay.js +134 -0
- package/data/probe/examples/chat/webServer.js +1103 -0
- package/data/probe/examples/reranker/Cargo.toml +33 -0
- package/data/probe/examples/reranker/DEBUG_OUTPUT_ANALYSIS.md +71 -0
- package/data/probe/examples/reranker/MODELS.md +66 -0
- package/data/probe/examples/reranker/MODEL_COMPARISON.md +60 -0
- package/data/probe/examples/reranker/MULTI_MODEL_ANALYSIS.md +176 -0
- package/data/probe/examples/reranker/PERFORMANCE_SUMMARY.md +156 -0
- package/data/probe/examples/reranker/README.md +347 -0
- package/data/probe/examples/reranker/RUST_BERT_COMPARISON.md +82 -0
- package/data/probe/examples/reranker/TOKENIZATION_GUIDE.md +120 -0
- package/data/probe/examples/reranker/check_rust_tokenizer.py +108 -0
- package/data/probe/examples/reranker/convert_to_torchscript.py +109 -0
- package/data/probe/examples/reranker/debug_scoring.py +189 -0
- package/data/probe/examples/reranker/debug_tokenization.py +154 -0
- package/data/probe/examples/reranker/download_models.sh +73 -0
- package/data/probe/examples/reranker/requirements.txt +13 -0
- package/data/probe/examples/reranker/run_comprehensive_benchmark.sh +83 -0
- package/data/probe/examples/reranker/rust_bert_test/Cargo.toml +12 -0
- package/data/probe/examples/reranker/rust_bert_test/README.md +54 -0
- package/data/probe/examples/reranker/simple_test.py +50 -0
- package/data/probe/examples/reranker/test_all_models.sh +63 -0
- package/data/probe/examples/reranker/test_bert_results.sh +44 -0
- package/data/probe/examples/reranker/test_cross_encoder.py +334 -0
- package/data/probe/examples/reranker/test_cross_encoder.sh +80 -0
- package/data/probe/examples/reranker/test_exact_comparison.py +151 -0
- package/data/probe/examples/reranker/test_parallel_performance.sh +56 -0
- package/data/probe/examples/reranker/test_scores.py +132 -0
- package/data/probe/install.ps1 +508 -0
- package/data/probe/install.sh +460 -0
- package/data/probe/npm/CLONE_METHOD_EXAMPLES.md +596 -0
- package/data/probe/npm/CONTEXT_COMPACTION.md +303 -0
- package/data/probe/npm/DELEGATE_TOOL_README.md +166 -0
- package/data/probe/npm/MAID_INTEGRATION.md +313 -0
- package/data/probe/npm/MCP_INTEGRATION_SUMMARY.md +241 -0
- package/data/probe/npm/README.md +824 -0
- package/data/probe/npm/bin/.gitignore +7 -0
- package/data/probe/npm/bin/.gitkeep +0 -0
- package/data/probe/npm/bin/README.md +12 -0
- package/data/probe/npm/bin/probe +167 -0
- package/data/probe/npm/docs/CLAUDE_CODE_INTEGRATION.md +414 -0
- package/data/probe/npm/docs/CODEX_INTEGRATION.md +502 -0
- package/data/probe/npm/docs/EDIT_CREATE_TOOLS.md +233 -0
- package/data/probe/npm/docs/RETRY_AND_FALLBACK.md +674 -0
- package/data/probe/npm/example-usage.js +335 -0
- package/data/probe/npm/examples/multi-engine-demo.js +117 -0
- package/data/probe/npm/examples/probe-agent-cli.js +113 -0
- package/data/probe/npm/examples/test-agent-edit.js +114 -0
- package/data/probe/npm/examples/test-edit-create.js +120 -0
- package/data/probe/npm/examples/test-edit-direct.js +114 -0
- package/data/probe/npm/index.d.ts +744 -0
- package/data/probe/npm/jest.config.js +52 -0
- package/data/probe/npm/package.json +117 -0
- package/data/probe/npm/scripts/build-agent.cjs +75 -0
- package/data/probe/npm/scripts/build-cjs.js +124 -0
- package/data/probe/npm/scripts/build-mcp.cjs +36 -0
- package/data/probe/npm/scripts/postinstall.js +216 -0
- package/data/probe/npm/test-codex-e2e.js +78 -0
- package/data/probe/npm/test-download-lock.js +109 -0
- package/data/probe/npm/test-grep-security.js +94 -0
- package/data/probe/npm/test-grep-simplified.js +63 -0
- package/data/probe/npm/test-grep.js +51 -0
- package/data/probe/npm/tests/README.md +96 -0
- package/data/probe/npm/tests/agent-compact-history.test.js +174 -0
- package/data/probe/npm/tests/allow-tests-default.test.js +151 -0
- package/data/probe/npm/tests/contextCompactor.test.js +498 -0
- package/data/probe/npm/tests/delegate-config.test.js +353 -0
- package/data/probe/npm/tests/delegate-integration.test.js +348 -0
- package/data/probe/npm/tests/extractor-integration.test.js +162 -0
- package/data/probe/npm/tests/extractor.test.js +317 -0
- package/data/probe/npm/tests/fixtures/sampleDiagrams.js +267 -0
- package/data/probe/npm/tests/integration/claude-code-auto-fallback.spec.js +148 -0
- package/data/probe/npm/tests/integration/claude-code-multi-step.spec.js +127 -0
- package/data/probe/npm/tests/integration/claude-code-tool-events.spec.js +163 -0
- package/data/probe/npm/tests/integration/codex-auto-fallback.spec.js +191 -0
- package/data/probe/npm/tests/integration/codex-tool-events.spec.js +147 -0
- package/data/probe/npm/tests/integration/examplesChatMcp.test.js +402 -0
- package/data/probe/npm/tests/integration/mcpDotenvSupport.test.js +174 -0
- package/data/probe/npm/tests/integration/mcpErrorHandling.test.js +566 -0
- package/data/probe/npm/tests/integration/mcpRobustness.test.js +564 -0
- package/data/probe/npm/tests/integration/mcpStdoutPurity.test.js +355 -0
- package/data/probe/npm/tests/integration/probeAgentMcp.test.js +398 -0
- package/data/probe/npm/tests/integration/retryFallback.test.js +368 -0
- package/data/probe/npm/tests/integration/schema-in-initial-message.test.js +318 -0
- package/data/probe/npm/tests/integration/schema-validation-loop-prevention.test.js +244 -0
- package/data/probe/npm/tests/integration/schemaRetryLogic.test.js +94 -0
- package/data/probe/npm/tests/integration/validationFlow.test.js +329 -0
- package/data/probe/npm/tests/manual/test-codex-basic.js +110 -0
- package/data/probe/npm/tests/mcp/mcpClientManager.test.js +614 -0
- package/data/probe/npm/tests/mcp/mcpConfig.test.js +359 -0
- package/data/probe/npm/tests/mcp/mcpXmlBridge.test.js +436 -0
- package/data/probe/npm/tests/mcp/mockMcpServer.js +510 -0
- package/data/probe/npm/tests/mcp-strict-syntax.test.js +319 -0
- package/data/probe/npm/tests/mermaidQuoteEscaping.test.js +214 -0
- package/data/probe/npm/tests/nestedQuoteFix.test.js +40 -0
- package/data/probe/npm/tests/setup.js +46 -0
- package/data/probe/npm/tests/unit/allowed-tools.test.js +513 -0
- package/data/probe/npm/tests/unit/attempt-completion-closing-tag-in-content.test.js +188 -0
- package/data/probe/npm/tests/unit/attemptCompletionJsonFix.test.js +238 -0
- package/data/probe/npm/tests/unit/attemptCompletionJsonIssue.test.js +128 -0
- package/data/probe/npm/tests/unit/backtickAutoFix.test.js +35 -0
- package/data/probe/npm/tests/unit/bash-probe-agent-integration.test.js +389 -0
- package/data/probe/npm/tests/unit/bash-simple-commands.test.js +324 -0
- package/data/probe/npm/tests/unit/bash-tool-comprehensive.test.js +371 -0
- package/data/probe/npm/tests/unit/bash-tool-integration.test.js +310 -0
- package/data/probe/npm/tests/unit/bash-tool.test.js +341 -0
- package/data/probe/npm/tests/unit/completion-prompt.test.js +379 -0
- package/data/probe/npm/tests/unit/cwd-path-options.test.js +287 -0
- package/data/probe/npm/tests/unit/delegate-limits.test.js +422 -0
- package/data/probe/npm/tests/unit/direct-content-attempt-completion.test.js +235 -0
- package/data/probe/npm/tests/unit/edit-create-tools.test.js +609 -0
- package/data/probe/npm/tests/unit/enhancedMermaidValidation.test.js +577 -0
- package/data/probe/npm/tests/unit/extract-content.test.js +83 -0
- package/data/probe/npm/tests/unit/extract-multiple-targets.test.js +89 -0
- package/data/probe/npm/tests/unit/fallbackManager.test.js +442 -0
- package/data/probe/npm/tests/unit/githubCompatibilityValidation.test.js +258 -0
- package/data/probe/npm/tests/unit/imageConfig.test.js +149 -0
- package/data/probe/npm/tests/unit/imagePathResolution.test.js +345 -0
- package/data/probe/npm/tests/unit/json-fixing-agent.test.js +238 -0
- package/data/probe/npm/tests/unit/json-validation-enhanced-errors.test.js +199 -0
- package/data/probe/npm/tests/unit/jsonValidationInfiniteLoopFix.test.js +228 -0
- package/data/probe/npm/tests/unit/maidIntegration.test.js +139 -0
- package/data/probe/npm/tests/unit/maxIterationsWarning.test.js +195 -0
- package/data/probe/npm/tests/unit/mermaidEdgeLabelFix.test.js +161 -0
- package/data/probe/npm/tests/unit/mermaidHtmlEntities.test.js +76 -0
- package/data/probe/npm/tests/unit/mermaidInfiniteLoopFix.test.js +64 -0
- package/data/probe/npm/tests/unit/mermaidValidation.test.js +723 -0
- package/data/probe/npm/tests/unit/mermaidValidationVisorExample.test.js +309 -0
- package/data/probe/npm/tests/unit/probe-agent-clone-realistic.test.js +643 -0
- package/data/probe/npm/tests/unit/probe-agent-clone.test.js +476 -0
- package/data/probe/npm/tests/unit/probe-agent-delegate.test.js +400 -0
- package/data/probe/npm/tests/unit/probe-agent-model-option.test.js +118 -0
- package/data/probe/npm/tests/unit/probeTool-security.test.js +283 -0
- package/data/probe/npm/tests/unit/readImageTool.test.js +418 -0
- package/data/probe/npm/tests/unit/retryManager.test.js +317 -0
- package/data/probe/npm/tests/unit/schema-aware-reminders.test.js +288 -0
- package/data/probe/npm/tests/unit/schemaDefinitionDetection.test.js +115 -0
- package/data/probe/npm/tests/unit/schemaUtils.test.js +1268 -0
- package/data/probe/npm/tests/unit/simpleTelemetry.test.js +282 -0
- package/data/probe/npm/tests/unit/simplified-attempt-completion.test.js +274 -0
- package/data/probe/npm/tests/unit/single-quote-json-bug.test.js +231 -0
- package/data/probe/npm/tests/unit/subgraphAutoFix.test.js +110 -0
- package/data/probe/npm/tests/unit/system-prompt.test.js +32 -0
- package/data/probe/npm/tests/unit/types-probe-agent-options.test.js +42 -0
- package/data/probe/npm/tests/unit/xmlParsing.test.js +720 -0
- package/data/probe/npm/tsconfig.json +21 -0
- package/data/probe/result1.txt +19 -0
- package/data/probe/result2.txt +26 -0
- package/data/probe/scripts/benchmark.sh +270 -0
- package/data/probe/scripts/cache_memory_analysis.rs +844 -0
- package/data/probe/scripts/claude-hook-wrapper.sh +56 -0
- package/data/probe/site/.env.example +10 -0
- package/data/probe/site/DEPLOYMENT.md +86 -0
- package/data/probe/site/README.md +183 -0
- package/data/probe/site/adding-languages.md +135 -0
- package/data/probe/site/ai-chat.md +427 -0
- package/data/probe/site/ai-integration.md +1488 -0
- package/data/probe/site/blog/agentic-flow-custom-xml-protocol.md +407 -0
- package/data/probe/site/blog/index.md +118 -0
- package/data/probe/site/blog/v0.6.0-release.md +426 -0
- package/data/probe/site/blog.md +8 -0
- package/data/probe/site/changelog.md +200 -0
- package/data/probe/site/cli-mode.md +437 -0
- package/data/probe/site/code-extraction.md +436 -0
- package/data/probe/site/contributing/README.md +9 -0
- package/data/probe/site/contributing/documentation-cross-references.md +215 -0
- package/data/probe/site/contributing/documentation-maintenance.md +275 -0
- package/data/probe/site/contributing/documentation-structure.md +75 -0
- package/data/probe/site/documentation-cross-references.md +215 -0
- package/data/probe/site/documentation-guide.md +132 -0
- package/data/probe/site/documentation-maintenance.md +275 -0
- package/data/probe/site/features.md +147 -0
- package/data/probe/site/how-it-works.md +118 -0
- package/data/probe/site/index.md +175 -0
- package/data/probe/site/index.md.bak +133 -0
- package/data/probe/site/installation.md +235 -0
- package/data/probe/site/integrations/docker.md +248 -0
- package/data/probe/site/integrations/github-actions.md +413 -0
- package/data/probe/site/language-support-overview.md +168 -0
- package/data/probe/site/mcp-integration.md +587 -0
- package/data/probe/site/mcp-server.md +304 -0
- package/data/probe/site/navigation-structure.md +76 -0
- package/data/probe/site/nodejs-sdk.md +798 -0
- package/data/probe/site/output-formats.md +625 -0
- package/data/probe/site/package.json +21 -0
- package/data/probe/site/public/_headers +28 -0
- package/data/probe/site/public/_redirects +11 -0
- package/data/probe/site/quick-start.md +289 -0
- package/data/probe/site/search-functionality.md +291 -0
- package/data/probe/site/search-reference.md +291 -0
- package/data/probe/site/supported-languages.md +215 -0
- package/data/probe/site/use-cases/README.md +8 -0
- package/data/probe/site/use-cases/advanced-cli.md +253 -0
- package/data/probe/site/use-cases/ai-code-editors.md +239 -0
- package/data/probe/site/use-cases/building-ai-tools.md +529 -0
- package/data/probe/site/use-cases/cli-ai-workflows.md +285 -0
- package/data/probe/site/use-cases/deploying-probe-web-interface.md +255 -0
- package/data/probe/site/use-cases/integrating-probe-into-ai-code-editors.md +161 -0
- package/data/probe/site/use-cases/nodejs-sdk.md +596 -0
- package/data/probe/site/use-cases/team-chat.md +350 -0
- package/data/probe/site/web-interface.md +434 -0
- package/data/probe/site/wrangler.toml +9 -0
- package/data/probe/test-api-key.sh +1 -0
- package/data/probe/test-probe-implementation/hello.js +7 -0
- package/data/probe/test_cases/demonstrate_early_termination_issues.sh +176 -0
- package/data/probe/test_cases/early_termination_issues.rs +533 -0
- package/data/probe/test_data/test_nested_struct.go +26 -0
- package/data/probe/tests/README.md +286 -0
- package/data/probe/tests/README_search_determinism_tests.md +116 -0
- package/data/probe/tests/adjacent_comment_test.rs +152 -0
- package/data/probe/tests/apostrophe_handling_tests.rs +132 -0
- package/data/probe/tests/block_filtering_with_ast_tests.rs +669 -0
- package/data/probe/tests/block_merging_tests.rs +396 -0
- package/data/probe/tests/c_outline_format_tests.rs +2179 -0
- package/data/probe/tests/cache_invalidation_issues.rs.disabled +682 -0
- package/data/probe/tests/cache_order_tests.rs +147 -0
- package/data/probe/tests/cache_query_scoping_tests.rs +221 -0
- package/data/probe/tests/cli_tests.rs +680 -0
- package/data/probe/tests/comment_context_integration_test.rs +240 -0
- package/data/probe/tests/common.rs +33 -0
- package/data/probe/tests/complex_block_merging_tests.rs +599 -0
- package/data/probe/tests/complex_query_block_filtering_tests.rs +422 -0
- package/data/probe/tests/control_flow_closing_braces_test.rs +91 -0
- package/data/probe/tests/cpp_outline_format_tests.rs +1507 -0
- package/data/probe/tests/csharp_outline_format_tests.rs +941 -0
- package/data/probe/tests/elastic_query_integration_tests.rs +922 -0
- package/data/probe/tests/extract_command_tests.rs +1848 -0
- package/data/probe/tests/extract_deduplication_tests.rs +146 -0
- package/data/probe/tests/extract_input_file_tests.rs +84 -0
- package/data/probe/tests/extract_prompt_tests.rs +102 -0
- package/data/probe/tests/filename_search_tests.rs +96 -0
- package/data/probe/tests/fixtures/user/AssemblyInfo.cs +3 -0
- package/data/probe/tests/github_extract_tests.rs +234 -0
- package/data/probe/tests/go_comment_test.rs +253 -0
- package/data/probe/tests/go_outline_format_tests.rs +2587 -0
- package/data/probe/tests/go_path_resolver_tests.rs +96 -0
- package/data/probe/tests/html_outline_format_tests.rs +637 -0
- package/data/probe/tests/integration_tests.rs +837 -0
- package/data/probe/tests/ip_whitelist_test.rs +148 -0
- package/data/probe/tests/java_outline_format_tests.rs +1611 -0
- package/data/probe/tests/javascript_extract_tests.rs +315 -0
- package/data/probe/tests/javascript_outline_format_tests.rs +1464 -0
- package/data/probe/tests/json_format_tests.rs +436 -0
- package/data/probe/tests/json_schema_validation_tests.rs +450 -0
- package/data/probe/tests/lib_usage.rs +60 -0
- package/data/probe/tests/line_comment_context_extension_test.rs +459 -0
- package/data/probe/tests/line_map_cache_tests.rs +114 -0
- package/data/probe/tests/markdown_integration_tests.rs +190 -0
- package/data/probe/tests/mocks/test_ip_whitelist.go +11 -0
- package/data/probe/tests/mocks/test_object.js +27 -0
- package/data/probe/tests/mocks/test_struct.go +50 -0
- package/data/probe/tests/multi_keyword_pattern_tests.rs +464 -0
- package/data/probe/tests/multi_language_syntax_integration_tests.rs +218 -0
- package/data/probe/tests/multiple_capture_groups_tests.rs +169 -0
- package/data/probe/tests/negative_compound_word_tests.rs +246 -0
- package/data/probe/tests/nested_symbol_extraction_tests.rs +99 -0
- package/data/probe/tests/outline_cross_file_interference_test.rs +335 -0
- package/data/probe/tests/outline_keyword_preservation_test.rs +67 -0
- package/data/probe/tests/output_format_edge_cases_tests.rs +693 -0
- package/data/probe/tests/parallel_extraction_tests.rs +178 -0
- package/data/probe/tests/parallel_search_tests.rs +355 -0
- package/data/probe/tests/path_resolver_tests.rs +698 -0
- package/data/probe/tests/php_outline_format_extended_tests.rs +928 -0
- package/data/probe/tests/php_outline_format_tests.rs +768 -0
- package/data/probe/tests/property_tests.proptest-regressions +9 -0
- package/data/probe/tests/property_tests.rs +118 -0
- package/data/probe/tests/python_outline_format_tests.rs +1538 -0
- package/data/probe/tests/query_command_json_tests.rs +438 -0
- package/data/probe/tests/query_command_tests.rs +232 -0
- package/data/probe/tests/query_command_xml_tests.rs +569 -0
- package/data/probe/tests/quoted_term_with_negative_keyword_tests.rs +216 -0
- package/data/probe/tests/required_terms_filename_tests.rs +116 -0
- package/data/probe/tests/ruby_outline_format_tests.rs +1011 -0
- package/data/probe/tests/rust_line_comment_context_test.rs +151 -0
- package/data/probe/tests/rust_outline_format_enhanced_tests.rs +725 -0
- package/data/probe/tests/rust_outline_format_tests.rs +843 -0
- package/data/probe/tests/schemas/xml_output_schema.xsd +38 -0
- package/data/probe/tests/search_determinism_tests.rs +451 -0
- package/data/probe/tests/search_hints_tests.rs +253 -0
- package/data/probe/tests/special_character_escaping_tests.rs +417 -0
- package/data/probe/tests/stemming_compound_word_filtering_tests.rs +535 -0
- package/data/probe/tests/strict_elastic_syntax_tests.rs +404 -0
- package/data/probe/tests/swift_outline_format_tests.rs +3319 -0
- package/data/probe/tests/symbols_tests.rs +166 -0
- package/data/probe/tests/test_file.rs +45 -0
- package/data/probe/tests/test_tokenize.rs +28 -0
- package/data/probe/tests/timeout_tests.rs +82 -0
- package/data/probe/tests/tokenization_tests.rs +195 -0
- package/data/probe/tests/tokenized_block_filtering_tests.rs +174 -0
- package/data/probe/tests/typescript_extract_tests.rs +214 -0
- package/data/probe/tests/typescript_outline_format_tests.rs +2188 -0
- package/data/probe/tests/xml_format_tests.rs +568 -0
- package/data/probe/tests/xml_schema_validation_tests.rs +497 -0
- package/data/scripts/postinstall.mjs +9 -0
- package/data/scripts/set-version.js +0 -0
- package/data/scripts/wiki-build.sh +111 -0
- package/data/scripts/wiki-deploy.sh +73 -0
- package/data/serve.json +12 -0
- package/data/test/demo-dynamic.html +134 -0
- package/data/test/demo-esm.html +105 -0
- package/data/test/demo-iife.html +78 -0
- package/data/tsconfig.json +7 -0
- package/data/vite.server.ts +483 -0
- package/data/vitest.config.ts +40 -0
- package/data/wiki/Home.md +58 -0
- package/data/wiki/_Sidebar.md +39 -0
- package/docs-mcp.config.json +20 -0
- package/package.json +56 -0
- package/src/config.js +111 -0
- package/src/index.js +395 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
### Navigation
|
|
2
|
+
|
|
3
|
+
**[🏠 Home](Home)**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Getting Started
|
|
8
|
+
- [Quick Start Guide](Quick-Start-Guide)
|
|
9
|
+
- [Example Usage](Example-Usage)
|
|
10
|
+
- [Authentication Configuration](Authentication-Configuration)
|
|
11
|
+
- [Backend Server](Backend-Server)
|
|
12
|
+
- [Redis Production Setup](Redis-Production-Setup)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### AI Features
|
|
17
|
+
- [AI Features Guide](AI-Features-Guide)
|
|
18
|
+
- [MCP Server Integration](MCP-Server-Integration)
|
|
19
|
+
- [API Reference](API-Reference)
|
|
20
|
+
- [Migration Guide](Migration-Guide)
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### Advanced
|
|
25
|
+
- [Widget Bundle Guide](Widget-Bundle-Guide)
|
|
26
|
+
- [Troubleshooting Guide](Troubleshooting-Guide)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### Development
|
|
31
|
+
- [Development Guide](Development-Guide)
|
|
32
|
+
- [NPM Publishing Guide](NPM-Publishing-Guide)
|
|
33
|
+
- [Backend API Guide](Backend-API-Guide)
|
|
34
|
+
- [Contributing](https://github.com/Crownpeak/dqm-react-component?tab=contributing-ov-file#contributing-to-crownpeak-dqm-react-component)
|
|
35
|
+
- [Code of Conduct](https://github.com/Crownpeak/dqm-react-component?tab=coc-ov-file#contributor-covenant-code-of-conduct)
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
**[View on GitHub](https://github.com/Crownpeak/dqm-react-component)**
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@crownpeak/dqm-react-component",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "A React component for Crownpeak Digital Quality Management (DQM) integration",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./widget": {
|
|
18
|
+
"types": "./dist/dqm-widget.d.ts",
|
|
19
|
+
"import": "./dist/dqm-widget.esm.js",
|
|
20
|
+
"default": "./dist/dqm-widget.esm.js"
|
|
21
|
+
},
|
|
22
|
+
"./dist/*": "./dist/*",
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"sideEffects": [
|
|
26
|
+
"./dist/dqm-widget.iife.js"
|
|
27
|
+
],
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"CHANGELOG.md",
|
|
33
|
+
"QUICKSTART.md",
|
|
34
|
+
"EXAMPLES.md",
|
|
35
|
+
"AUTHENTICATION.md",
|
|
36
|
+
"BACKEND-API.md",
|
|
37
|
+
"DEVELOPMENT.md",
|
|
38
|
+
"PUBLISHING.md"
|
|
39
|
+
],
|
|
40
|
+
"keywords": [
|
|
41
|
+
"react",
|
|
42
|
+
"crownpeak",
|
|
43
|
+
"dqm",
|
|
44
|
+
"digital-quality-management",
|
|
45
|
+
"accessibility",
|
|
46
|
+
"quality-analysis",
|
|
47
|
+
"mui",
|
|
48
|
+
"component"
|
|
49
|
+
],
|
|
50
|
+
"author": "Crownpeak Technology GmbH",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "https://github.com/Crownpeak/dqm-react-component.git"
|
|
55
|
+
},
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/Crownpeak/dqm-react-component/issues"
|
|
58
|
+
},
|
|
59
|
+
"homepage": "https://github.com/Crownpeak/dqm-react-component#readme",
|
|
60
|
+
"scripts": {
|
|
61
|
+
"dev": "npm run build:auth-ui && npm run dev:client",
|
|
62
|
+
"dev:client": "vite --host 0.0.0.0",
|
|
63
|
+
"dev:server": "concurrently \"redis-server\" \"REDIS_URL=redis://localhost:6379 tsx watch server/index.ts\"",
|
|
64
|
+
"dev:auth-ui": "cd server-ui && vite --host 0.0.0.0",
|
|
65
|
+
"build": "npm run build:lib && npm run build:widget && npm run build:server && npm run build:auth-ui",
|
|
66
|
+
"build:lib": "tsc && vite build --mode library",
|
|
67
|
+
"build:widget": "vite build --mode widget && cp src/html-pages/dqm-widget.d.ts dist/",
|
|
68
|
+
"build:server": "tsc -p tsconfig.server.json",
|
|
69
|
+
"build:auth-ui": "cd server-ui && vite build",
|
|
70
|
+
"start": "npm run build && concurrently \"npm run start:server\" \"vite\"",
|
|
71
|
+
"start:server": "REDIS_URL=redis://localhost:6379 node dist/server/index.js",
|
|
72
|
+
"serve:widget": "npx serve -l 4173 -c serve.json",
|
|
73
|
+
"prepublishOnly": "npm run build && npm run lint && npm run test:ci",
|
|
74
|
+
"lint": "eslint . || true",
|
|
75
|
+
"preview": "vite preview --host",
|
|
76
|
+
"test": "vitest",
|
|
77
|
+
"test:ui": "vitest --ui",
|
|
78
|
+
"test:run": "vitest run",
|
|
79
|
+
"test:coverage": "vitest run --coverage",
|
|
80
|
+
"test:ci": "vitest run --reporter=verbose",
|
|
81
|
+
"test:e2e": "playwright test",
|
|
82
|
+
"test:e2e:ui": "playwright test --ui",
|
|
83
|
+
"test:e2e:headed": "playwright test --headed",
|
|
84
|
+
"test:e2e:debug": "playwright test --debug",
|
|
85
|
+
"wiki:build": "./scripts/wiki-build.sh",
|
|
86
|
+
"wiki:deploy": "./scripts/wiki-deploy.sh",
|
|
87
|
+
"setVersion": "npm version --workspaces --no-git-tag-version",
|
|
88
|
+
"licenses:generate": "generate-license-file --config .glfrc.json",
|
|
89
|
+
"licenses:check": "license-checker --onlyAllow 'MIT;ISC;Apache-2.0;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0;CC-BY-3.0;CC-BY-4.0;Python-2.0;BlueOak-1.0.0;Zlib;WTFPL' --production",
|
|
90
|
+
"licenses:check:all": "npm run licenses:check && npm run licenses:check --prefix mcp-server",
|
|
91
|
+
"licenses:check:ci": "npm run licenses:check:all || (echo 'License check failed! See above for incompatible licenses.' && exit 1)",
|
|
92
|
+
"prepare": "husky"
|
|
93
|
+
},
|
|
94
|
+
"workspaces": [
|
|
95
|
+
"mcp-server"
|
|
96
|
+
],
|
|
97
|
+
"peerDependencies": {
|
|
98
|
+
"@mui/icons-material": ">=5.0.0",
|
|
99
|
+
"@mui/material": ">=5.0.0",
|
|
100
|
+
"react": ">=18.0.0",
|
|
101
|
+
"react-dom": ">=18.0.0"
|
|
102
|
+
},
|
|
103
|
+
"dependencies": {
|
|
104
|
+
"@emotion/react": "^11.14.0",
|
|
105
|
+
"@emotion/styled": "^11.14.1",
|
|
106
|
+
"@reduxjs/toolkit": "^2.3.0",
|
|
107
|
+
"@types/ioredis": "^5.0.0",
|
|
108
|
+
"@webcontainer/env": "^1.1.1",
|
|
109
|
+
"axios": "^1.13.2",
|
|
110
|
+
"chroma-js": "^3.2.0",
|
|
111
|
+
"cors": "^2.8.5",
|
|
112
|
+
"dompurify": "^3.3.0",
|
|
113
|
+
"dotenv": "^17.2.3",
|
|
114
|
+
"express": "^5.2.1",
|
|
115
|
+
"framer-motion": "^12.23.25",
|
|
116
|
+
"helmet": "^8.1.0",
|
|
117
|
+
"html-react-parser": "^5.2.10",
|
|
118
|
+
"i18next": "^23.16.8",
|
|
119
|
+
"ioredis": "^5.8.2",
|
|
120
|
+
"lodash.sortby": "^4.7.0",
|
|
121
|
+
"react-i18next": "^15.1.0",
|
|
122
|
+
"react-redux": "^9.2.0"
|
|
123
|
+
},
|
|
124
|
+
"devDependencies": {
|
|
125
|
+
"@codemirror/lang-html": "^6.4.11",
|
|
126
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
127
|
+
"@eslint/js": "^9.39.1",
|
|
128
|
+
"generate-license-file": "^3.5.1",
|
|
129
|
+
"husky": "^9.1.7",
|
|
130
|
+
"license-checker": "^25.0.1",
|
|
131
|
+
"@mui/icons-material": "^7.3.6",
|
|
132
|
+
"@mui/material": "^7.3.6",
|
|
133
|
+
"@mui/styled-engine": "^7.3.6",
|
|
134
|
+
"@mui/system": "^7.3.6",
|
|
135
|
+
"@playwright/test": "^1.50.0",
|
|
136
|
+
"@testing-library/dom": "^10.4.1",
|
|
137
|
+
"@testing-library/jest-dom": "^6.6.0",
|
|
138
|
+
"@testing-library/react": "^16.0.0",
|
|
139
|
+
"@testing-library/user-event": "^14.5.0",
|
|
140
|
+
"@types/chroma-js": "^3.1.2",
|
|
141
|
+
"@types/cors": "^2.8.19",
|
|
142
|
+
"@types/dompurify": "^3.2.0",
|
|
143
|
+
"@types/express": "^5.0.6",
|
|
144
|
+
"@types/lodash.sortby": "^4.7.9",
|
|
145
|
+
"@types/node": "^24.10.1",
|
|
146
|
+
"@types/react": "^19.2.7",
|
|
147
|
+
"@types/react-dom": "^19.2.3",
|
|
148
|
+
"@uiw/react-codemirror": "^4.25.3",
|
|
149
|
+
"@vitejs/plugin-react-swc": "^4.2.2",
|
|
150
|
+
"@vitest/coverage-v8": "^2.1.0",
|
|
151
|
+
"@vitest/ui": "^2.1.0",
|
|
152
|
+
"concurrently": "^9.2.1",
|
|
153
|
+
"eslint": "^9.39.1",
|
|
154
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
155
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
156
|
+
"globals": "^16.5.0",
|
|
157
|
+
"jsdom": "^25.0.0",
|
|
158
|
+
"magic-string": "^0.30.21",
|
|
159
|
+
"msw": "^2.4.0",
|
|
160
|
+
"react": "^19.2.1",
|
|
161
|
+
"react-dom": "^19.2.1",
|
|
162
|
+
"terser": "^5.44.1",
|
|
163
|
+
"tsx": "^4.21.0",
|
|
164
|
+
"typescript": "~5.9.3",
|
|
165
|
+
"typescript-eslint": "^8.48.1",
|
|
166
|
+
"vite": "^7.2.7",
|
|
167
|
+
"vite-plugin-dts": "^4.5.4",
|
|
168
|
+
"vitest": "^2.1.0"
|
|
169
|
+
},
|
|
170
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
171
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Playwright E2E Test Configuration
|
|
5
|
+
* @see https://playwright.dev/docs/test-configuration
|
|
6
|
+
*/
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
testDir: './e2e',
|
|
9
|
+
/* Run tests in files in parallel */
|
|
10
|
+
fullyParallel: true,
|
|
11
|
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
12
|
+
forbidOnly: !!process.env.CI,
|
|
13
|
+
/* Retry on CI only */
|
|
14
|
+
retries: process.env.CI ? 2 : 0,
|
|
15
|
+
/* Opt out of parallel tests on CI. */
|
|
16
|
+
workers: process.env.CI ? 1 : undefined,
|
|
17
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
18
|
+
reporter: [['html', { outputFolder: 'playwright-report' }], ['list']],
|
|
19
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
20
|
+
use: {
|
|
21
|
+
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
22
|
+
baseURL: 'http://localhost:5173',
|
|
23
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
24
|
+
trace: 'on-first-retry',
|
|
25
|
+
/* Take screenshots on failure */
|
|
26
|
+
screenshot: 'only-on-failure',
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
/* Configure projects for major browsers */
|
|
30
|
+
projects: [
|
|
31
|
+
{
|
|
32
|
+
name: 'chromium',
|
|
33
|
+
use: { ...devices['Desktop Chrome'] },
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
{
|
|
37
|
+
name: 'firefox',
|
|
38
|
+
use: { ...devices['Desktop Firefox'] },
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
{
|
|
42
|
+
name: 'webkit',
|
|
43
|
+
use: { ...devices['Desktop Safari'] },
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
/* Test against mobile viewports. */
|
|
47
|
+
{
|
|
48
|
+
name: 'Mobile Chrome',
|
|
49
|
+
use: { ...devices['Pixel 5'] },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'Mobile Safari',
|
|
53
|
+
use: { ...devices['iPhone 12'] },
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
|
|
57
|
+
/* Run your local dev server before starting the tests */
|
|
58
|
+
webServer: {
|
|
59
|
+
command: 'npm run dev:client',
|
|
60
|
+
url: 'http://localhost:5173',
|
|
61
|
+
reuseExistingServer: !process.env.CI,
|
|
62
|
+
timeout: 120 * 1000,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Target-specific overrides for Windows MSVC
|
|
2
|
+
[target.x86_64-pc-windows-msvc]
|
|
3
|
+
rustflags = ["-C", "target-feature=+crt-static", "-C", "link-args=/DEBUG:NONE /NOLOGO"]
|
|
4
|
+
|
|
5
|
+
[target.i686-pc-windows-msvc]
|
|
6
|
+
rustflags = ["-C", "target-feature=+crt-static", "-C", "link-args=/DEBUG:NONE /NOLOGO"]
|
|
7
|
+
|
|
8
|
+
# Configuration for Windows builds
|
|
9
|
+
[target.'cfg(target_os = "windows")']
|
|
10
|
+
# General Windows configuration
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
You goal is to measure and improve performance.
|
|
2
|
+
|
|
3
|
+
First run `cargo build --release` and remember the current performance: DEBUG=1 ./target/release/probe search "yaml workflow agent multi-agent user input" ~/go/src/semantic-kernel/ --max-tokens 10000 2>/dev/null | sed -n '/=== SEARCH TIMING INFORMATION ===/,/====================================/p'
|
|
4
|
+
|
|
5
|
+
Print it to the user.
|
|
6
|
+
|
|
7
|
+
Now that you have a baseline, find all the steps which take more then 1 second, and run the seaprate @architecture-agent for each, to plan if we can significantly improve performance. For each suggestion measure confidence. If confidence is high, add it to the detailed plan, if not, say that it is already performance enough.
|
|
8
|
+
|
|
9
|
+
Once you went though all the steps and build solid plan, I want you to start implementing it in a separate agent.
|
|
10
|
+
But always explicitly ask user before each next implementation.
|
|
11
|
+
|
|
12
|
+
Each change should be measured, and compared with our baseline. You can add more debugging to search timing information, or making it more detailed if needed.
|
|
13
|
+
Once each change implemented, it should be commited as a separate commit.
|
|
14
|
+
|
|
15
|
+
We do care about backward compatibility, about determenistic outputs as well. Be careful. Validate each change by re-running all the tests..
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# Probe Project Guidelines
|
|
2
|
+
|
|
3
|
+
This file provides guidelines for AI assistants and developers working on the probe project.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
Probe is a tool for searching code repositories with powerful filtering and ranking capabilities. It provides:
|
|
8
|
+
- Regex-based code search with stemming and stopword removal
|
|
9
|
+
- Language-aware code block extraction
|
|
10
|
+
- Frequency-based search for better relevance
|
|
11
|
+
- Flexible term matching with boundary control
|
|
12
|
+
- Result ranking using TF-IDF and BM25 algorithms
|
|
13
|
+
|
|
14
|
+
## Project Structure
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
probe/
|
|
18
|
+
├── src/ # Main source code
|
|
19
|
+
│ ├── language/ # Language-specific parsing
|
|
20
|
+
│ ├── search/ # Core search functionality
|
|
21
|
+
│ │ ├── file_processing.rs # File content processing
|
|
22
|
+
│ │ ├── file_search.rs # File searching logic
|
|
23
|
+
│ │ ├── query.rs # Query processing
|
|
24
|
+
│ │ ├── result_ranking.rs # Result ranking algorithms
|
|
25
|
+
│ │ └── search_execution.rs # Main search execution
|
|
26
|
+
│ ├── agent.rs # AI agent implementation
|
|
27
|
+
│ ├── lib.rs # Library entry point
|
|
28
|
+
│ └── main.rs # CLI application entry point
|
|
29
|
+
├── tests/ # Integration tests
|
|
30
|
+
│ ├── mocks/ # Mock files for testing
|
|
31
|
+
│ └── ... # Various test files
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Code Style Guide
|
|
35
|
+
|
|
36
|
+
### Rust Conventions
|
|
37
|
+
|
|
38
|
+
1. **Naming**:
|
|
39
|
+
- Use `snake_case` for variables, functions, and modules
|
|
40
|
+
- Use `CamelCase` for types and traits
|
|
41
|
+
- Use `SCREAMING_SNAKE_CASE` for constants
|
|
42
|
+
|
|
43
|
+
2. **Documentation**:
|
|
44
|
+
- All public functions, structs, and modules should have doc comments
|
|
45
|
+
- Use `///` for doc comments
|
|
46
|
+
- Include examples where appropriate
|
|
47
|
+
|
|
48
|
+
3. **Error Handling**:
|
|
49
|
+
- Use `Result<T, E>` for functions that can fail
|
|
50
|
+
- Prefer `?` operator for error propagation
|
|
51
|
+
- Use `anyhow::Result` for functions that can return multiple error types
|
|
52
|
+
|
|
53
|
+
4. **Formatting**:
|
|
54
|
+
- Follow standard Rust formatting (rustfmt)
|
|
55
|
+
- Use 4 spaces for indentation
|
|
56
|
+
- Maximum line length of 100 characters
|
|
57
|
+
|
|
58
|
+
### Project-Specific Conventions
|
|
59
|
+
|
|
60
|
+
1. **Pattern Generation**:
|
|
61
|
+
- When generating regex patterns, use `HashSet` to avoid duplicates
|
|
62
|
+
- For term patterns, generate three variants: start boundary, end boundary, and no boundary
|
|
63
|
+
- For multi-term queries, generate concatenated combinations
|
|
64
|
+
|
|
65
|
+
2. **File Processing**:
|
|
66
|
+
- Use AST parsing when possible for more accurate code block extraction
|
|
67
|
+
- Fall back to line-based context when AST parsing fails
|
|
68
|
+
- Apply the 80% rule: if more than 80% of a file is matched, return the entire file
|
|
69
|
+
|
|
70
|
+
## Testing Approach
|
|
71
|
+
|
|
72
|
+
### Test Organization
|
|
73
|
+
|
|
74
|
+
1. **Unit Tests**:
|
|
75
|
+
- Place unit tests in the same file as the code they test
|
|
76
|
+
- Use `#[cfg(test)]` module at the end of each file
|
|
77
|
+
- For complex modules, use a separate `*_tests.rs` file in the same directory
|
|
78
|
+
- Include the tests using `include!("module_tests.rs")` in a `#[cfg(test)]` module
|
|
79
|
+
|
|
80
|
+
2. **Integration Tests**:
|
|
81
|
+
- Place integration tests in the `tests/` directory
|
|
82
|
+
- Use descriptive names for test files
|
|
83
|
+
- Group related tests in the same file
|
|
84
|
+
|
|
85
|
+
### Running Tests
|
|
86
|
+
|
|
87
|
+
1. **Unit Tests**:
|
|
88
|
+
```bash
|
|
89
|
+
cargo test --lib
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
2. **Integration Tests**:
|
|
93
|
+
```bash
|
|
94
|
+
cargo test --test integration_tests
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
3. **All Tests**:
|
|
98
|
+
```bash
|
|
99
|
+
cargo test
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
4. **Specific Tests**:
|
|
103
|
+
```bash
|
|
104
|
+
cargo test test_name
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Test Coverage
|
|
108
|
+
|
|
109
|
+
- Aim for high test coverage, especially for core functionality
|
|
110
|
+
- Include tests for edge cases and error conditions
|
|
111
|
+
- Use property-based testing for functions with complex input domains
|
|
112
|
+
|
|
113
|
+
## Common Commands
|
|
114
|
+
|
|
115
|
+
### Building
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
cargo build
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Running
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
cargo run -- search "query" path/to/search
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Debug Mode
|
|
128
|
+
|
|
129
|
+
Enable debug mode to see detailed logging:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
DEBUG=1 cargo run -- search "query" path/to/search
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### MCP Server
|
|
136
|
+
|
|
137
|
+
Start the MCP server:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
probe mcp
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Dependency Management
|
|
144
|
+
|
|
145
|
+
1. **Adding Dependencies**:
|
|
146
|
+
- Add new dependencies to `Cargo.toml`
|
|
147
|
+
- Prefer well-maintained crates with good documentation
|
|
148
|
+
- Consider the impact on build time and binary size
|
|
149
|
+
|
|
150
|
+
2. **Versioning**:
|
|
151
|
+
- Use semantic versioning for dependencies
|
|
152
|
+
- Specify version constraints to avoid breaking changes
|
|
153
|
+
|
|
154
|
+
## File Organization
|
|
155
|
+
|
|
156
|
+
1. **Module Structure**:
|
|
157
|
+
- Use `mod.rs` files for module organization
|
|
158
|
+
- Group related functionality in the same module
|
|
159
|
+
- Export public items from the module root
|
|
160
|
+
|
|
161
|
+
2. **Code Organization**:
|
|
162
|
+
- Place related functions and types together
|
|
163
|
+
- Use private helper functions for complex logic
|
|
164
|
+
- Keep functions focused on a single responsibility
|
|
165
|
+
|
|
166
|
+
## Making Changes
|
|
167
|
+
|
|
168
|
+
When making changes to the codebase:
|
|
169
|
+
|
|
170
|
+
1. **Pattern Generation**:
|
|
171
|
+
- When modifying `create_term_patterns`, ensure it handles:
|
|
172
|
+
- Individual terms with flexible boundaries
|
|
173
|
+
- Concatenated term combinations for multi-term queries
|
|
174
|
+
- Proper regex escaping for special characters
|
|
175
|
+
|
|
176
|
+
2. **Search Execution**:
|
|
177
|
+
- When modifying `perform_probe`, ensure it:
|
|
178
|
+
- Properly maps patterns to terms
|
|
179
|
+
- Handles both "any term" and "all terms" modes
|
|
180
|
+
- Correctly processes filename matches
|
|
181
|
+
|
|
182
|
+
3. **Result Ranking**:
|
|
183
|
+
- When modifying ranking algorithms, ensure they:
|
|
184
|
+
- Properly calculate TF-IDF and BM25 scores
|
|
185
|
+
- Handle edge cases (empty documents, rare terms)
|
|
186
|
+
- Maintain backward compatibility with existing code
|
|
187
|
+
## Debugging Tips
|
|
188
|
+
|
|
189
|
+
1. **Debug Mode**:
|
|
190
|
+
- Set `DEBUG=1` to enable debug logging
|
|
191
|
+
- Debug logs include detailed information about:
|
|
192
|
+
- Pattern generation
|
|
193
|
+
- File matching
|
|
194
|
+
- Term frequencies
|
|
195
|
+
- Result ranking
|
|
196
|
+
|
|
197
|
+
2. **Common Issues**:
|
|
198
|
+
- If search returns no results, check:
|
|
199
|
+
- Query preprocessing (stemming, stopwords)
|
|
200
|
+
- Pattern generation
|
|
201
|
+
- File matching logic
|
|
202
|
+
- If ranking seems incorrect, check:
|
|
203
|
+
- Term frequency calculation
|
|
204
|
+
- Document length normalization
|
|
205
|
+
- Score combination logic
|
|
206
|
+
|
|
207
|
+
## AI Agent
|
|
208
|
+
|
|
209
|
+
The `agent.rs` file implements an AI-powered assistant that can interact with the code search functionality.
|
|
210
|
+
|
|
211
|
+
### Agent Overview
|
|
212
|
+
|
|
213
|
+
- **Purpose**: Provides an interactive AI assistant that can search code repositories and answer questions about the codebase
|
|
214
|
+
- **Models**: Supports both Anthropic's Claude and OpenAI's GPT models
|
|
215
|
+
- **Features**:
|
|
216
|
+
- Interactive CLI interface
|
|
217
|
+
- Token usage tracking
|
|
218
|
+
- Conversation history management
|
|
219
|
+
- Tool integration with code search functionality
|
|
220
|
+
- Colored output formatting
|
|
221
|
+
|
|
222
|
+
### Components
|
|
223
|
+
|
|
224
|
+
1. **ProbeSearch Tool**:
|
|
225
|
+
- Implements the `Tool` trait from the `rig` crate
|
|
226
|
+
- Allows the AI to search code using the core probe functionality
|
|
227
|
+
- Configurable with various search parameters (pattern, path, exact matching, etc.)
|
|
228
|
+
- Returns formatted search results to the AI
|
|
229
|
+
|
|
230
|
+
2. **ModelType Enum**:
|
|
231
|
+
- Represents different LLM backends:
|
|
232
|
+
- `Anthropic`: Uses Claude models via Anthropic's API
|
|
233
|
+
- `OpenAI`: Uses GPT models via OpenAI's API
|
|
234
|
+
|
|
235
|
+
3. **ProbeAgent Struct**:
|
|
236
|
+
- Main agent implementation
|
|
237
|
+
- Handles model initialization based on available API keys
|
|
238
|
+
- Tracks token usage for requests and responses
|
|
239
|
+
- Implements conversation handling
|
|
240
|
+
|
|
241
|
+
4. **Chat Implementation**:
|
|
242
|
+
- Implements the `RigChat` trait for handling conversations
|
|
243
|
+
- Manages conversation history with a limit to prevent context explosion
|
|
244
|
+
- Processes tool calls within AI responses
|
|
245
|
+
- Handles continuation prompts after tool execution
|
|
246
|
+
|
|
247
|
+
### Usage
|
|
248
|
+
|
|
249
|
+
1. **Starting the Agent**:
|
|
250
|
+
```bash
|
|
251
|
+
cargo run -- agent
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
2. **Environment Variables**:
|
|
255
|
+
- `ANTHROPIC_API_KEY`: API key for Anthropic (Claude models)
|
|
256
|
+
- `OPENAI_API_KEY`: API key for OpenAI (GPT models)
|
|
257
|
+
- `MODEL_NAME`: Override the default model (optional)
|
|
258
|
+
- `ANTHROPIC_API_URL`: Override the default Anthropic API URL (optional)
|
|
259
|
+
- `OPENAI_API_URL`: Override the default OpenAI API URL (optional)
|
|
260
|
+
- `DEBUG`: Enable debug output (set to any value)
|
|
261
|
+
|
|
262
|
+
3. **CLI Commands**:
|
|
263
|
+
- `help`: Display help information
|
|
264
|
+
- `quit`: Exit the assistant
|
|
265
|
+
|
|
266
|
+
### Implementation Details
|
|
267
|
+
|
|
268
|
+
1. **Token Tracking**:
|
|
269
|
+
- Uses `tiktoken_rs::cl100k_base` for token counting
|
|
270
|
+
- Tracks request and response tokens separately
|
|
271
|
+
- Displays token usage information after each interaction
|
|
272
|
+
|
|
273
|
+
2. **Conversation Management**:
|
|
274
|
+
- Limits history to `MAX_HISTORY_MESSAGES` (4) to prevent context explosion
|
|
275
|
+
- Filters out tool outputs from history to save tokens
|
|
276
|
+
- Uses continuation prompts to maintain context after tool execution
|
|
277
|
+
|
|
278
|
+
3. **Tool Execution**:
|
|
279
|
+
- Detects "tool:" calls in AI responses
|
|
280
|
+
- Executes the ProbeSearch tool with provided parameters
|
|
281
|
+
- Returns results to the AI for further processing
|
|
282
|
+
- Handles errors and provides appropriate error messages
|
|
283
|
+
|
|
284
|
+
4. **Model-Specific Handling**:
|
|
285
|
+
- Different prompt formats for Anthropic vs OpenAI
|
|
286
|
+
- Adjusts token limits based on model capabilities
|
|
287
|
+
- Handles API-specific requirements and response formats
|
|
288
|
+
- Score combination logic
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Git files
|
|
2
|
+
.git/
|
|
3
|
+
.github/
|
|
4
|
+
.gitignore
|
|
5
|
+
.githooks/
|
|
6
|
+
|
|
7
|
+
# Build artifacts
|
|
8
|
+
target/
|
|
9
|
+
Cargo.lock
|
|
10
|
+
|
|
11
|
+
# Documentation
|
|
12
|
+
*.md
|
|
13
|
+
!README.md
|
|
14
|
+
!LICENSE
|
|
15
|
+
!ABOUT.MD
|
|
16
|
+
docs/
|
|
17
|
+
site/
|
|
18
|
+
|
|
19
|
+
# IDE and editor files
|
|
20
|
+
.vscode/
|
|
21
|
+
.idea/
|
|
22
|
+
*.swp
|
|
23
|
+
*.swo
|
|
24
|
+
*~
|
|
25
|
+
.DS_Store
|
|
26
|
+
|
|
27
|
+
# Test files
|
|
28
|
+
tests/
|
|
29
|
+
test_cases/
|
|
30
|
+
*.test.*
|
|
31
|
+
|
|
32
|
+
# Scripts and CI
|
|
33
|
+
scripts/
|
|
34
|
+
.claude/
|
|
35
|
+
|
|
36
|
+
# Node.js artifacts (for examples/chat)
|
|
37
|
+
node_modules/
|
|
38
|
+
npm-debug.log*
|
|
39
|
+
yarn-debug.log*
|
|
40
|
+
yarn-error.log*
|
|
41
|
+
.npm/
|
|
42
|
+
.yarn/
|
|
43
|
+
|
|
44
|
+
# Examples (but keep benchmarks - needed for Cargo.toml validation)
|
|
45
|
+
examples/
|
|
46
|
+
!examples/chat/
|
|
47
|
+
|
|
48
|
+
# MCP directories
|
|
49
|
+
mcp-agent/
|
|
50
|
+
|
|
51
|
+
# NPM package directory
|
|
52
|
+
npm/
|
|
53
|
+
|
|
54
|
+
# Temporary files
|
|
55
|
+
*.tmp
|
|
56
|
+
*.log
|
|
57
|
+
*.cache
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Post-commit hook to provide feedback after a successful commit
|
|
4
|
+
# Installed by 'make install-hooks'
|
|
5
|
+
|
|
6
|
+
# Colors for better output
|
|
7
|
+
GREEN='\033[0;32m'
|
|
8
|
+
NC='\033[0m' # No Color
|
|
9
|
+
|
|
10
|
+
echo "${GREEN}Commit successful! All checks passed.${NC}"
|
|
11
|
+
echo "${GREEN}Remember to push your changes.${NC}"
|