cursor-agent-tools 0.1.7__tar.gz

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.
Files changed (84) hide show
  1. cursor_agent_tools-0.1.7/.env.example +17 -0
  2. cursor_agent_tools-0.1.7/.flake8 +14 -0
  3. cursor_agent_tools-0.1.7/.github/FUNDING.yml +4 -0
  4. cursor_agent_tools-0.1.7/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
  5. cursor_agent_tools-0.1.7/.github/ISSUE_TEMPLATE/feature_request.md +26 -0
  6. cursor_agent_tools-0.1.7/.github/pull_request_template.md +32 -0
  7. cursor_agent_tools-0.1.7/.github/workflows/publish.yml +114 -0
  8. cursor_agent_tools-0.1.7/.github/workflows/test.yml +45 -0
  9. cursor_agent_tools-0.1.7/.gitignore +87 -0
  10. cursor_agent_tools-0.1.7/.mypy.ini +24 -0
  11. cursor_agent_tools-0.1.7/CODEOWNERS +14 -0
  12. cursor_agent_tools-0.1.7/CODE_OF_CONDUCT.md +65 -0
  13. cursor_agent_tools-0.1.7/CONTRIBUTING.md +118 -0
  14. cursor_agent_tools-0.1.7/LICENSE +21 -0
  15. cursor_agent_tools-0.1.7/MANIFEST.in +18 -0
  16. cursor_agent_tools-0.1.7/PKG-INFO +729 -0
  17. cursor_agent_tools-0.1.7/README.md +681 -0
  18. cursor_agent_tools-0.1.7/SECURITY.md +38 -0
  19. cursor_agent_tools-0.1.7/agent/__init__.py +5 -0
  20. cursor_agent_tools-0.1.7/agent/base.py +174 -0
  21. cursor_agent_tools-0.1.7/agent/claude_agent.py +422 -0
  22. cursor_agent_tools-0.1.7/agent/factory.py +117 -0
  23. cursor_agent_tools-0.1.7/agent/interact.py +1008 -0
  24. cursor_agent_tools-0.1.7/agent/openai_agent.py +367 -0
  25. cursor_agent_tools-0.1.7/agent/permissions.py +200 -0
  26. cursor_agent_tools-0.1.7/agent/tools/__init__.py +18 -0
  27. cursor_agent_tools-0.1.7/agent/tools/file_tools.py +311 -0
  28. cursor_agent_tools-0.1.7/agent/tools/register_tools.py +222 -0
  29. cursor_agent_tools-0.1.7/agent/tools/search_tools.py +274 -0
  30. cursor_agent_tools-0.1.7/agent/tools/system_tools.py +85 -0
  31. cursor_agent_tools-0.1.7/constraints.md +261 -0
  32. cursor_agent_tools-0.1.7/cursor_agent/__init__.py +9 -0
  33. cursor_agent_tools-0.1.7/cursor_agent/agent/__init__.py +18 -0
  34. cursor_agent_tools-0.1.7/cursor_agent_tools.egg-info/PKG-INFO +729 -0
  35. cursor_agent_tools-0.1.7/cursor_agent_tools.egg-info/SOURCES.txt +82 -0
  36. cursor_agent_tools-0.1.7/cursor_agent_tools.egg-info/dependency_links.txt +1 -0
  37. cursor_agent_tools-0.1.7/cursor_agent_tools.egg-info/not-zip-safe +1 -0
  38. cursor_agent_tools-0.1.7/cursor_agent_tools.egg-info/requires.txt +17 -0
  39. cursor_agent_tools-0.1.7/cursor_agent_tools.egg-info/top_level.txt +2 -0
  40. cursor_agent_tools-0.1.7/docs/permissions_guide.md +291 -0
  41. cursor_agent_tools-0.1.7/examples/README.md +134 -0
  42. cursor_agent_tools-0.1.7/examples/basic_usage.py +174 -0
  43. cursor_agent_tools-0.1.7/examples/chat_conversation_example.py +156 -0
  44. cursor_agent_tools-0.1.7/examples/code_search_example.py +618 -0
  45. cursor_agent_tools-0.1.7/examples/demo_files/calculator.py +15 -0
  46. cursor_agent_tools-0.1.7/examples/demo_files/interactive_demo/app/main.py +30 -0
  47. cursor_agent_tools-0.1.7/examples/demo_files/interactive_demo/app/todo_model.py +33 -0
  48. cursor_agent_tools-0.1.7/examples/demo_files/interactive_demo/requirements.txt +2 -0
  49. cursor_agent_tools-0.1.7/examples/demo_files/test_calculator.py +38 -0
  50. cursor_agent_tools-0.1.7/examples/demo_project/README.md +20 -0
  51. cursor_agent_tools-0.1.7/examples/demo_project/config.yaml +5 -0
  52. cursor_agent_tools-0.1.7/examples/demo_project/database.py +117 -0
  53. cursor_agent_tools-0.1.7/examples/demo_project/main.py +42 -0
  54. cursor_agent_tools-0.1.7/examples/demo_project/models/user.py +47 -0
  55. cursor_agent_tools-0.1.7/examples/demo_project/utils/config.py +78 -0
  56. cursor_agent_tools-0.1.7/examples/demo_project/utils/logger.py +57 -0
  57. cursor_agent_tools-0.1.7/examples/file_manipulation_example.py +169 -0
  58. cursor_agent_tools-0.1.7/examples/interactive_mode_example.py +144 -0
  59. cursor_agent_tools-0.1.7/examples/main.py +127 -0
  60. cursor_agent_tools-0.1.7/examples/permission_example.py +190 -0
  61. cursor_agent_tools-0.1.7/examples/simple_task_example.py +120 -0
  62. cursor_agent_tools-0.1.7/examples/utils.py +112 -0
  63. cursor_agent_tools-0.1.7/factorial.py +25 -0
  64. cursor_agent_tools-0.1.7/pyproject.toml +45 -0
  65. cursor_agent_tools-0.1.7/pytest.ini +15 -0
  66. cursor_agent_tools-0.1.7/requirements.txt +8 -0
  67. cursor_agent_tools-0.1.7/run_ci_checks.sh +103 -0
  68. cursor_agent_tools-0.1.7/run_tests.py +281 -0
  69. cursor_agent_tools-0.1.7/setup.cfg +4 -0
  70. cursor_agent_tools-0.1.7/setup.py +79 -0
  71. cursor_agent_tools-0.1.7/test.py +1 -0
  72. cursor_agent_tools-0.1.7/test_anthropic.py +24 -0
  73. cursor_agent_tools-0.1.7/test_link_replacement.py +55 -0
  74. cursor_agent_tools-0.1.7/tests/__init__.py +2 -0
  75. cursor_agent_tools-0.1.7/tests/create_test_dirs.py +101 -0
  76. cursor_agent_tools-0.1.7/tests/test_anthropic_direct.py +68 -0
  77. cursor_agent_tools-0.1.7/tests/test_anthropic_key.py +75 -0
  78. cursor_agent_tools-0.1.7/tests/test_basic.py +32 -0
  79. cursor_agent_tools-0.1.7/tests/test_claude_agent.py +147 -0
  80. cursor_agent_tools-0.1.7/tests/test_claude_chat.py +60 -0
  81. cursor_agent_tools-0.1.7/tests/test_openai_agent.py +210 -0
  82. cursor_agent_tools-0.1.7/tests/test_permissions.py +218 -0
  83. cursor_agent_tools-0.1.7/tests/test_tools.py +266 -0
  84. cursor_agent_tools-0.1.7/tests/utils.py +171 -0
@@ -0,0 +1,17 @@
1
+ # Environment (local, development, production)
2
+ ENVIRONMENT=local
3
+
4
+ # OpenAI configuration
5
+ OPENAI_API_KEY=your_openai_api_key_here
6
+ OPENAI_API_MODEL=gpt-4o
7
+ OPENAI_TEMPERATURE=0.0
8
+
9
+ # Anthropic configuration
10
+ ANTHROPIC_API_KEY=your_anthropic_api_key_here
11
+ ANTHROPIC_API_MODEL=claude-3-5-sonnet-latest
12
+ ANTHROPIC_TEMPERATURE=0.0
13
+
14
+ # Additional configuration
15
+ # LOG_LEVEL=INFO
16
+ # DISABLE_TOOLS=false
17
+ # TOOL_TIMEOUT=30
@@ -0,0 +1,14 @@
1
+ [flake8]
2
+ max-line-length = 100
3
+ exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,venv
4
+ ignore = E203, E501, W503
5
+
6
+ per-file-ignores =
7
+ __init__.py: F401
8
+ agent/claude_agent.py: W293,W291
9
+ agent/tools/*.py: W293
10
+ tests/demo/*: F841,W293,W291,W504,F401,E402,F541
11
+ tests/*: F841,W293,W291,W504,F401,E128
12
+
13
+ # Match Black style
14
+ line-length = 100
@@ -0,0 +1,4 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [usecodenaija]
4
+ custom: ['https://civai.co']
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: "[BUG] "
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ **Describe the bug**
10
+ A clear and concise description of what the bug is.
11
+
12
+ **To Reproduce**
13
+ Steps to reproduce the behavior:
14
+ 1. Setup environment with '...'
15
+ 2. Run code '...'
16
+ 3. Execute function '...'
17
+ 4. See error
18
+
19
+ **Expected behavior**
20
+ A clear and concise description of what you expected to happen.
21
+
22
+ **Code Sample**
23
+ If applicable, add a minimal code sample to reproduce the issue.
24
+
25
+ ```python
26
+ # Your code here
27
+ ```
28
+
29
+ **Environment (please complete the following information):**
30
+ - OS: [e.g. macOS, Windows, Linux]
31
+ - Python Version: [e.g. 3.8.10]
32
+ - Package Version: [e.g. 0.1.0]
33
+ - Model Used: [e.g. Claude 3 Opus, GPT-4o]
34
+
35
+ **Additional context**
36
+ Add any other context about the problem here, such as specific API settings or configurations.
37
+
38
+ **Stack Trace**
39
+ If applicable, include the full error stack trace.
40
+
41
+ ```
42
+ Paste stack trace here
43
+ ```
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: "[FEATURE] "
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ **Is your feature request related to a problem? Please describe.**
10
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11
+
12
+ **Describe the solution you'd like**
13
+ A clear and concise description of what you want to happen.
14
+
15
+ **Describe alternatives you've considered**
16
+ A clear and concise description of any alternative solutions or features you've considered.
17
+
18
+ **Example usage**
19
+ If applicable, add an example of how this feature would be used in code.
20
+
21
+ ```python
22
+ # Example code showing how the new feature would be used
23
+ ```
24
+
25
+ **Additional context**
26
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,32 @@
1
+ ## Description
2
+
3
+ Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
4
+
5
+ Fixes # (issue)
6
+
7
+ ## Type of change
8
+
9
+ Please delete options that are not relevant.
10
+
11
+ - [ ] Bug fix (non-breaking change which fixes an issue)
12
+ - [ ] New feature (non-breaking change which adds functionality)
13
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14
+ - [ ] Documentation update
15
+
16
+ ## How Has This Been Tested?
17
+
18
+ Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
19
+
20
+ - [ ] Test A
21
+ - [ ] Test B
22
+
23
+ ## Checklist:
24
+
25
+ - [ ] My code follows the style guidelines of this project
26
+ - [ ] I have performed a self-review of my own code
27
+ - [ ] I have commented my code, particularly in hard-to-understand areas
28
+ - [ ] I have made corresponding changes to the documentation
29
+ - [ ] My changes generate no new warnings
30
+ - [ ] I have added tests that prove my fix is effective or that my feature works
31
+ - [ ] New and existing unit tests pass locally with my changes
32
+ - [ ] Any dependent changes have been merged and published in downstream modules
@@ -0,0 +1,114 @@
1
+ name: Package Publishing
2
+
3
+ on:
4
+ # Trigger on release creation
5
+ release:
6
+ types: [created]
7
+
8
+ # Trigger on push to staging or tags
9
+ push:
10
+ branches: [staging]
11
+ tags:
12
+ - 'v*' # Push events to tags matching v*, i.e. v1.0, v20.15.10
13
+
14
+ # Manual trigger for other branches
15
+ workflow_dispatch:
16
+ inputs:
17
+ environment:
18
+ description: 'Publishing environment'
19
+ required: true
20
+ default: 'test'
21
+ type: choice
22
+ options:
23
+ - test
24
+
25
+ jobs:
26
+ build-and-publish:
27
+ runs-on: ubuntu-latest
28
+
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+
32
+ - name: Set up Python
33
+ uses: actions/setup-python@v4
34
+ with:
35
+ python-version: "3.11"
36
+
37
+ - name: Install dependencies
38
+ run: |
39
+ python -m pip install --upgrade pip
40
+ pip install build twine
41
+
42
+ - name: Build package
43
+ run: python -m build
44
+
45
+ # Always publish to Test PyPI if manually triggered
46
+ - name: Verify TestPyPI Token
47
+ if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/staging' || github.event_name == 'release' || startsWith(github.ref, 'refs/tags/')
48
+ env:
49
+ TWINE_USERNAME: __token__
50
+ TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
51
+ run: |
52
+ # Check if token is present and has correct format
53
+ if [[ -z "${TWINE_PASSWORD}" ]]; then
54
+ echo "ERROR: TestPyPI token is empty. Please add a valid TEST_PYPI_API_TOKEN secret."
55
+ exit 1
56
+ fi
57
+
58
+ # Masked output to check general format without revealing token
59
+ TOKEN_PREFIX=$(echo $TWINE_PASSWORD | cut -c1-5)
60
+ TOKEN_LENGTH=${#TWINE_PASSWORD}
61
+
62
+ echo "Token prefix: ${TOKEN_PREFIX}** (masked)"
63
+ echo "Token length: ${TOKEN_LENGTH} characters"
64
+
65
+ if [[ $TOKEN_LENGTH -lt 40 ]]; then
66
+ echo "WARNING: Token appears too short. TestPyPI tokens are typically longer."
67
+ fi
68
+
69
+ # Always publish to Test PyPI if manually triggered
70
+ - name: Publish to Test PyPI (Manual Trigger)
71
+ if: github.event_name == 'workflow_dispatch'
72
+ env:
73
+ TWINE_USERNAME: __token__
74
+ TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
75
+ run: |
76
+ twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
77
+
78
+ # Publish to Test PyPI on staging branch push
79
+ - name: Publish to Test PyPI (Staging)
80
+ if: github.event_name == 'push' && github.ref == 'refs/heads/staging'
81
+ env:
82
+ TWINE_USERNAME: __token__
83
+ TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
84
+ run: |
85
+ twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
86
+
87
+ # Publish to both Test PyPI and PyPI on release from main or tag push
88
+ - name: Publish to Test PyPI (Release or Tag)
89
+ if: github.event_name == 'release' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
90
+ env:
91
+ TWINE_USERNAME: __token__
92
+ TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
93
+ run: |
94
+ twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
95
+
96
+ - name: Publish to PyPI (Release or Tag)
97
+ if: github.event_name == 'release' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
98
+ env:
99
+ TWINE_USERNAME: __token__
100
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
101
+ run: |
102
+ # Note: PyPI uses different tokens than TestPyPI - make sure you're using the right one
103
+ twine upload --verbose dist/*
104
+
105
+ - name: Upload artifacts to release
106
+ if: github.event_name == 'release' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
107
+ uses: softprops/action-gh-release@v1
108
+ with:
109
+ files: dist/*
110
+ # Create a release if it's a tag push
111
+ name: Release ${{ github.ref_name }}
112
+ draft: false
113
+ prerelease: false
114
+ generate_release_notes: true
@@ -0,0 +1,45 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.9", "3.10", "3.11"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v4
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -e ".[dev]"
28
+ pip install pytest pytest-cov flake8 mypy types-requests
29
+
30
+ - name: Run linting
31
+ run: |
32
+ flake8 agent tests --config=.flake8
33
+ mypy agent tests --config-file=.mypy.ini
34
+
35
+ - name: Run tests with coverage
36
+ run: |
37
+ # Run tests with -xvs to show output, make it verbose, and not capture output
38
+ # Use -k "not" expressions to skip tests that require API keys or file system access
39
+ pytest -xvs --cov=agent tests/ --cov-report=xml -k "not anthropic and not openai and not fs_tools"
40
+
41
+ # - name: Upload coverage to Codecov
42
+ # uses: codecov/codecov-action@v3
43
+ # with:
44
+ # file: ./coverage.xml
45
+ # fail_ci_if_error: true
@@ -0,0 +1,87 @@
1
+ # Environment variables
2
+ .env
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Environments
55
+ .env
56
+ .venv
57
+ env/
58
+ venv/
59
+ ENV/
60
+ env.bak/
61
+ venv.bak/
62
+
63
+ # IDE-specific files
64
+ .idea/
65
+ .vscode/
66
+ *.swp
67
+ *.swo
68
+
69
+ # Project-specific
70
+ demo_output/
71
+ test_output/
72
+ temp/
73
+
74
+ # macOS
75
+ .DS_Store
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # Log files
81
+ *.log
82
+
83
+ venv_test/
84
+ .cursorrules
85
+ examples/demo_files/*
86
+ test_permission/*
87
+ test_permission
@@ -0,0 +1,24 @@
1
+ [mypy]
2
+ python_version = 3.10
3
+ warn_return_any = True
4
+ warn_unused_configs = True
5
+ disallow_untyped_defs = True
6
+ disallow_incomplete_defs = True
7
+
8
+ [mypy.plugins.numpy.*]
9
+ follow_imports = skip
10
+
11
+ [mypy-tests.demo.*]
12
+ ignore_errors = True
13
+
14
+ [mypy-tests.demo_files.*]
15
+ ignore_errors = True
16
+
17
+ [mypy-tests.test_anthropic_direct]
18
+ ignore_errors = True
19
+
20
+ [mypy-main]
21
+ ignore_errors = True
22
+
23
+ [mypy-tests.test_anthropic_key]
24
+ ignore_errors = True
@@ -0,0 +1,14 @@
1
+ # These owners will be the default owners for everything in
2
+ # the repo. Unless a later match takes precedence,
3
+ # @usecodenaija will be requested for review when someone opens a pull request.
4
+ * @usecodenaija
5
+
6
+ # Agent implementation
7
+ /agent/ @usecodenaija
8
+
9
+ # Documentation files
10
+ *.md @usecodenaija
11
+
12
+ # Build and configuration files
13
+ setup.py @usecodenaija
14
+ requirements.txt @usecodenaija
@@ -0,0 +1,65 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Project maintainers are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies within all community spaces, and also applies when
49
+ an individual is officially representing the community in public spaces.
50
+
51
+ ## Enforcement
52
+
53
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
54
+ reported to the project maintainers responsible for enforcement at
55
+ hello@civai.co or by contacting [@usecodenaija](https://twitter.com/usecodenaija) on Twitter.
56
+ All complaints will be reviewed and investigated promptly and fairly.
57
+
58
+ All project maintainers are obligated to respect the privacy and security of the
59
+ reporter of any incident.
60
+
61
+ ## Attribution
62
+
63
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
64
+ version 2.1, available at
65
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
@@ -0,0 +1,118 @@
1
+ # Contributing to Cursor Agent
2
+
3
+ Thank you for your interest in contributing to Cursor Agent! This document provides guidelines and instructions for contributing to the project.
4
+
5
+ ## Code of Conduct
6
+
7
+ By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md). Please read it before contributing.
8
+
9
+ ## How Can I Contribute?
10
+
11
+ ### Reporting Bugs
12
+
13
+ Before submitting a bug report:
14
+ - Check the [issue tracker](https://github.com/civai-technologies/cursor-agent/issues) to see if the issue has already been reported.
15
+ - If you're unable to find an open issue addressing the problem, open a new one.
16
+
17
+ When filing an issue, please include:
18
+ - A clear title and description of the bug
19
+ - Steps to reproduce the issue
20
+ - Expected behavior vs. actual behavior
21
+ - Environment details (OS, Python version, etc.)
22
+ - Any relevant screenshots or error messages
23
+
24
+ ### Suggesting Enhancements
25
+
26
+ Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
27
+ - Use a clear and descriptive title
28
+ - Provide a detailed description of the suggested enhancement
29
+ - Explain why this enhancement would be useful
30
+ - Include examples of how it would be used
31
+
32
+ ### Pull Requests
33
+
34
+ 1. Fork the repository
35
+ 2. Create a new branch from `main` for your changes
36
+ 3. Make your changes and commit them with clear, descriptive commit messages
37
+ 4. Add or update tests as necessary
38
+ 5. Update documentation as needed
39
+ 6. Push your branch to your fork
40
+ 7. Open a pull request against the `main` branch
41
+
42
+ #### Pull Request Guidelines
43
+
44
+ - Keep PRs focused on a single feature or fix
45
+ - Include tests for new functionality
46
+ - Update documentation for any changed functionality
47
+ - Follow the existing code style
48
+ - Make sure all tests pass before submitting your PR
49
+ - Reference related issues in your PR description
50
+
51
+ ## Development Environment Setup
52
+
53
+ 1. Fork and clone the repository
54
+ ```bash
55
+ git clone https://github.com/civai-technologies/cursor-agent.git
56
+ cd cursor-agent
57
+ ```
58
+
59
+ 2. Create a virtual environment
60
+ ```bash
61
+ python3 -m venv venv
62
+ source venv/bin/activate # On Windows, use `venv\Scripts\activate`
63
+ ```
64
+
65
+ 3. Install development dependencies
66
+ ```bash
67
+ pip install -e ".[dev]"
68
+ ```
69
+
70
+ 4. Set up your API keys (for testing)
71
+ ```bash
72
+ export ANTHROPIC_API_KEY="your_key_here"
73
+ export OPENAI_API_KEY="your_key_here"
74
+ ```
75
+
76
+ ## Testing
77
+
78
+ Run the test suite with:
79
+ ```bash
80
+ python run_tests.py
81
+ ```
82
+
83
+ To run specific tests:
84
+ ```bash
85
+ python -m unittest tests.test_tools
86
+ ```
87
+
88
+ ## Coding Style
89
+
90
+ - Follow PEP 8 guidelines
91
+ - Use clear, descriptive variable and function names
92
+ - Add docstrings to all functions and classes
93
+ - Aim for a maximum line length of 100 characters
94
+ - Use type hints where appropriate
95
+
96
+ ## Documentation
97
+
98
+ - Update the README.md with any new features, configuration options, or changes to usage
99
+ - Update or create examples for new functionality
100
+ - Add docstrings to your code for new functions, classes, or methods
101
+
102
+ ## Review Process
103
+
104
+ - At least one project maintainer must approve a PR before it can be merged
105
+ - You may be asked to make changes to your PR based on feedback
106
+ - Once approved, the maintainer will merge your PR
107
+
108
+ ## License
109
+
110
+ By contributing to Cursor Agent, you agree that your contributions will be licensed under the project's [MIT License](LICENSE).
111
+
112
+ ## Questions?
113
+
114
+ If you have any questions or need help, please:
115
+ - Open an issue with the "question" label
116
+ - Reach out to Nifemi Alpine on Twitter [@usecodenaija](https://twitter.com/usecodenaija)
117
+
118
+ Thank you for contributing to make Cursor Agent better!
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Nifemi Alpine (Founder of CIVAI TECHNOLOGIES: civai.co)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,18 @@
1
+ include LICENSE
2
+ include README.md
3
+ include requirements.txt
4
+ include pyproject.toml
5
+
6
+ recursive-include agent *.py
7
+ recursive-include agent *.json
8
+ recursive-include agent *.yaml
9
+ recursive-include agent *.yml
10
+
11
+ recursive-exclude * __pycache__
12
+ recursive-exclude * *.py[cod]
13
+ recursive-exclude * .git
14
+ recursive-exclude * .env*
15
+ recursive-exclude * *.log
16
+ recursive-exclude * .pytest_cache
17
+ recursive-exclude * .coverage
18
+ recursive-exclude * htmlcov