@bniladridas/cursor 0.1.7
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/.clang-tidy +28 -0
- package/.dockerignore +56 -0
- package/.env.example +29 -0
- package/.github/CODEOWNERS +2 -0
- package/.github/ISSUE_TEMPLATE/blank.md +27 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
- package/.github/SECURITY.md +24 -0
- package/.github/codeql/codeql-config.yml +8 -0
- package/.github/dependabot.yml +14 -0
- package/.github/labeler.yml +50 -0
- package/.github/packaging/brand-cursor.png +0 -0
- package/.github/packaging/database/init.sql +48 -0
- package/.github/packaging/docker/Dockerfile +111 -0
- package/.github/packaging/docker/docker-compose.yml +56 -0
- package/.github/packaging/scripts/preflight.sh +413 -0
- package/.github/packaging/scripts/prepare-release.sh +141 -0
- package/.github/packaging/scripts/release.sh +22 -0
- package/.github/packaging/scripts/setup-git-hooks.sh +73 -0
- package/.github/pull_request_template.md +31 -0
- package/.github/signed.json +9 -0
- package/.github/workflows/README.md +23 -0
- package/.github/workflows/ci.yml +181 -0
- package/.github/workflows/cla.yml +33 -0
- package/.github/workflows/formula-sha.yml +63 -0
- package/.github/workflows/issue-response.yml +44 -0
- package/.github/workflows/labeler.yml +42 -0
- package/.github/workflows/pr-body.yml +49 -0
- package/.github/workflows/release.yml +176 -0
- package/.github/workflows/security.yml +94 -0
- package/.github/workflows/stale.yml +38 -0
- package/AGENTS.md +49 -0
- package/CHANGELOG.md +3 -0
- package/CMakeLists.txt +646 -0
- package/Formula/cursor.rb +46 -0
- package/LICENSE +201 -0
- package/Makefile +28 -0
- package/README.md +46 -0
- package/cli.js +16 -0
- package/include/agent.h +86 -0
- package/include/agent_mode.h +17 -0
- package/include/memory_manager.h +102 -0
- package/include/services/ai_service.h +31 -0
- package/include/services/auth_service.h +87 -0
- package/include/services/checkpoint_service.h +69 -0
- package/include/services/codebase_service.h +38 -0
- package/include/services/command_service.h +23 -0
- package/include/services/context_service.h +74 -0
- package/include/services/database_service.h +56 -0
- package/include/services/error_service.h +106 -0
- package/include/services/file_service.h +51 -0
- package/include/services/git_service.h +29 -0
- package/include/services/github_service.h +85 -0
- package/include/services/mcp_service.h +85 -0
- package/include/services/multi_file_service.h +93 -0
- package/include/services/sandbox_service.h +96 -0
- package/include/services/theme_service.h +67 -0
- package/include/services/web_service.h +52 -0
- package/include/utils/config.h +68 -0
- package/include/utils/memory_utils.h +79 -0
- package/include/utils/platform.h +56 -0
- package/include/utils/ui.h +43 -0
- package/include/utils/validation.h +63 -0
- package/include/utils/version.h.in +17 -0
- package/install.js +49 -0
- package/package.json +16 -0
- package/release/checksums.txt +3 -0
- package/release/cursor-linux/cursor_v0.1.7_linux_amd64.tar.gz +0 -0
- package/release/cursor-macos/cursor_v0.1.7_darwin_arm64.tar.gz +0 -0
- package/release/cursor-windows/cursor__windows_amd64.zip +0 -0
- package/src/agent.cpp +2026 -0
- package/src/main.cpp +97 -0
- package/src/memory_manager.cpp +814 -0
- package/src/services/ai_service.cpp +366 -0
- package/src/services/auth_service.cpp +779 -0
- package/src/services/checkpoint_service.cpp +465 -0
- package/src/services/codebase_service.cpp +233 -0
- package/src/services/command_service.cpp +82 -0
- package/src/services/context_service.cpp +348 -0
- package/src/services/database_service.cpp +148 -0
- package/src/services/error_service.cpp +438 -0
- package/src/services/file_service.cpp +349 -0
- package/src/services/git_service.cpp +148 -0
- package/src/services/github_service.cpp +435 -0
- package/src/services/mcp_service.cpp +481 -0
- package/src/services/multi_file_service.cpp +591 -0
- package/src/services/sandbox_service.cpp +678 -0
- package/src/services/theme_service.cpp +429 -0
- package/src/services/web_service.cpp +532 -0
- package/src/utils/config.cpp +77 -0
- package/src/utils/memory_utils.cpp +93 -0
- package/src/utils/ui.cpp +307 -0
- package/src/utils/validation.cpp +306 -0
- package/src/utils/version.cpp +175 -0
- package/tests/e2e/docker-compose.yml +195 -0
- package/tests/e2e/run_e2e_tests.sh +70 -0
- package/tests/e2e/run_tests_in_docker.sh +115 -0
- package/tests/main_test.cpp +16 -0
- package/tests/mocks/mock_ollama.py +98 -0
- package/tests/mocks/start_nginx.sh +64 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
# Create nginx config directory
|
|
5
|
+
mkdir -p /tmp/nginx
|
|
6
|
+
|
|
7
|
+
# Determine the mock response based on MOCK_TYPE
|
|
8
|
+
if [ "$MOCK_TYPE" = "fireworks" ]; then
|
|
9
|
+
RESPONSE='{"choices": [{"message": {"content": "Mock Fireworks response"}}]}'
|
|
10
|
+
ENDPOINT="/inference/v1/chat/completions"
|
|
11
|
+
elif [ "$MOCK_TYPE" = "groq" ]; then
|
|
12
|
+
RESPONSE='{"choices": [{"message": {"content": "Mock Groq response"}}]}'
|
|
13
|
+
ENDPOINT="/openai/v1/chat/completions"
|
|
14
|
+
elif [ "$MOCK_TYPE" = "together" ]; then
|
|
15
|
+
RESPONSE='{"choices": [{"message": {"content": "Mock Together AI response"}}]}'
|
|
16
|
+
ENDPOINT="/v1/chat/completions"
|
|
17
|
+
elif [ "$MOCK_TYPE" = "cerebras" ]; then
|
|
18
|
+
RESPONSE='data: {"choices": [{"delta": {"content": "Mock Cerebras response"}}]}
|
|
19
|
+
data: [DONE]'
|
|
20
|
+
ENDPOINT="/v1/chat/completions"
|
|
21
|
+
elif [ "$MOCK_TYPE" = "deepseek" ]; then
|
|
22
|
+
RESPONSE='{"choices": [{"message": {"content": "Mock DeepSeek response"}}]}'
|
|
23
|
+
ENDPOINT="/v1/chat/completions"
|
|
24
|
+
elif [ "$MOCK_TYPE" = "openai" ]; then
|
|
25
|
+
RESPONSE='{"choices": [{"message": {"content": "Mock OpenAI response"}}]}'
|
|
26
|
+
ENDPOINT="/v1/chat/completions"
|
|
27
|
+
elif [ "$MOCK_TYPE" = "ollama" ]; then
|
|
28
|
+
RESPONSE='{"model": "llama3.2:3b", "created_at": "2023-09-23T00:00:00Z", "message": {"role": "assistant", "content": "This is a mock response from Ollama."}, "done": true}'
|
|
29
|
+
ENDPOINT="/api/chat"
|
|
30
|
+
else
|
|
31
|
+
RESPONSE='{"error": "Unknown mock"}'
|
|
32
|
+
ENDPOINT="/v1/chat/completions"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Create nginx config
|
|
36
|
+
cat > /tmp/nginx/nginx.conf << EOF
|
|
37
|
+
error_log /dev/stderr warn;
|
|
38
|
+
pid /tmp/nginx/nginx.pid;
|
|
39
|
+
|
|
40
|
+
events {
|
|
41
|
+
worker_connections 1024;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
http {
|
|
45
|
+
server {
|
|
46
|
+
listen 80;
|
|
47
|
+
access_log /dev/stdout;
|
|
48
|
+
error_log /dev/stderr;
|
|
49
|
+
|
|
50
|
+
location = /health {
|
|
51
|
+
add_header Content-Type text/plain;
|
|
52
|
+
return 200 "healthy\n";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
location $ENDPOINT {
|
|
56
|
+
add_header Content-Type application/json;
|
|
57
|
+
return 200 '$RESPONSE';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
EOF
|
|
62
|
+
|
|
63
|
+
# Start nginx
|
|
64
|
+
exec nginx -c /tmp/nginx/nginx.conf -g 'daemon off;'
|