glean-agent-toolkit 0.2.0__tar.gz → 0.4.0__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.
- glean_agent_toolkit-0.4.0/.cz.toml +8 -0
- glean_agent_toolkit-0.4.0/.env.template +6 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/.github/workflows/ci.yml +9 -11
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/.github/workflows/publish.yml +1 -1
- glean_agent_toolkit-0.4.0/.markdown-coderc.json +14 -0
- glean_agent_toolkit-0.4.0/.pre-commit-config.yaml +23 -0
- glean_agent_toolkit-0.4.0/AGENTS.md +55 -0
- glean_agent_toolkit-0.4.0/CHANGELOG.md +16 -0
- glean_agent_toolkit-0.4.0/COMMIT_LINTING.md +166 -0
- glean_agent_toolkit-0.4.0/CONTRIBUTING.md +94 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/PKG-INFO +213 -69
- glean_agent_toolkit-0.4.0/README.md +421 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/RELEASE.md +7 -3
- glean_agent_toolkit-0.4.0/docs/prerequisites.md +65 -0
- glean_agent_toolkit-0.4.0/mise.toml +201 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/pyproject.toml +21 -8
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-01.bash +1 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-01.py +41 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-02.bash +4 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-02.py +1 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-03.bash +1 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-03.py +22 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-04.bash +2 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-04.py +43 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-05.bash +2 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-05.py +36 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-06.bash +2 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-06.py +9 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-07.bash +11 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-07.py +9 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-08.py +10 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-09.py +9 -0
- glean_agent_toolkit-0.4.0/snippets/readme/snippet-10.py +38 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/adapters/adk.py +4 -3
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/adapters/crewai.py +1 -1
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/adapters/langchain.py +1 -1
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/adapters/openai.py +1 -1
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/decorators.py +134 -64
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/tools/__init__.py +6 -6
- glean_agent_toolkit-0.4.0/src/glean/agent_toolkit/tools/_common.py +123 -0
- glean_agent_toolkit-0.4.0/src/glean/agent_toolkit/tools/calendar_search.py +49 -0
- glean_agent_toolkit-0.4.0/src/glean/agent_toolkit/tools/code_search.py +51 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/tools/employee_search.py +31 -6
- glean_agent_toolkit-0.4.0/src/glean/agent_toolkit/tools/gmail_search.py +47 -0
- glean_agent_toolkit-0.4.0/src/glean/agent_toolkit/tools/outlook_search.py +47 -0
- glean_agent_toolkit-0.4.0/src/glean/agent_toolkit/tools/read_document.py +89 -0
- glean_agent_toolkit-0.4.0/src/glean/agent_toolkit/tools/search.py +50 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/tools/web_search.py +25 -5
- glean_agent_toolkit-0.4.0/tests/cassettes/test_search_api_error.yaml +81 -0
- glean_agent_toolkit-0.4.0/tests/cassettes/test_search_success.yaml +83 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/conftest.py +1 -1
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/test_common.py +79 -21
- glean_agent_toolkit-0.4.0/tests/test_enhanced_schemas.py +171 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/test_schema_generation.py +28 -16
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/tools/test_calendar_search.py +10 -17
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/tools/test_code_search.py +5 -11
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/tools/test_employee_search.py +10 -17
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/tools/test_gmail_search.py +6 -12
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/tools/test_outlook_search.py +5 -10
- glean_agent_toolkit-0.4.0/tests/tools/test_read_document.py +70 -0
- glean_agent_toolkit-0.4.0/tests/tools/test_search.py +29 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/tools/test_web_search.py +6 -13
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/uv.lock +372 -248
- glean_agent_toolkit-0.2.0/.cz.toml +0 -5
- glean_agent_toolkit-0.2.0/.env.template +0 -3
- glean_agent_toolkit-0.2.0/CHANGELOG.md +0 -5
- glean_agent_toolkit-0.2.0/CONTRIBUTING.md +0 -93
- glean_agent_toolkit-0.2.0/README.md +0 -278
- glean_agent_toolkit-0.2.0/Taskfile.yml +0 -270
- glean_agent_toolkit-0.2.0/mise.toml +0 -4
- glean_agent_toolkit-0.2.0/src/glean/agent_toolkit/tools/_common.py +0 -36
- glean_agent_toolkit-0.2.0/src/glean/agent_toolkit/tools/ai_web_search.py +0 -40
- glean_agent_toolkit-0.2.0/src/glean/agent_toolkit/tools/calendar_search.py +0 -18
- glean_agent_toolkit-0.2.0/src/glean/agent_toolkit/tools/code_search.py +0 -29
- glean_agent_toolkit-0.2.0/src/glean/agent_toolkit/tools/glean_search.py +0 -26
- glean_agent_toolkit-0.2.0/src/glean/agent_toolkit/tools/gmail_search.py +0 -23
- glean_agent_toolkit-0.2.0/src/glean/agent_toolkit/tools/outlook_search.py +0 -23
- glean_agent_toolkit-0.2.0/tests/tools/test_ai_web_search.py +0 -66
- glean_agent_toolkit-0.2.0/tests/tools/test_glean_search.py +0 -33
- glean_agent_toolkit-0.2.0/workflows/python-package.yml +0 -46
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/.gitignore +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/.vscode/settings.json +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/CODEOWNERS +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/LICENSE +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/pyrightconfig.json +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/__init__.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/adapters/__init__.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/adapters/base.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/py.typed +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/registry.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/src/glean/agent_toolkit/spec.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/__init__.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_ai_web_search_api_error.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_ai_web_search_complex_query.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_ai_web_search_no_results.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_ai_web_search_success.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_ai_web_search_various_queries[blockchain applications].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_ai_web_search_various_queries[cloud computing trends].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_ai_web_search_various_queries[cybersecurity best practices].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_ai_web_search_various_queries[machine learning frameworks 2025].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_ai_web_search_various_queries[sustainable technology solutions].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_api_error.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_by_attendee.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_by_date_range.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_no_results.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_success.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_various_queries[client demo presentation].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_various_queries[conference room bookings].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_various_queries[one-on-one meetings].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_various_queries[quarterly business review].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_calendar_search_various_queries[sprint planning meeting].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_code_search_api_error.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_code_search_complex_query.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_code_search_empty_query.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_code_search_success.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_code_search_various_queries[API endpoint security].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_code_search_various_queries[class UserManager].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_code_search_various_queries[database connection pool].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_code_search_various_queries[error handling middleware].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_code_search_various_queries[function login validation].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_api_error.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_by_department.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_by_role.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_no_results.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_success.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_various_queries[Sarah Johnson product manager].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_various_queries[UX designer mobile apps].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_various_queries[data scientist machine learning].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_various_queries[frontend developer React].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_employee_search_various_queries[security engineer DevOps].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_glean_search_api_error.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_glean_search_success.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_api_error.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_no_emails_found.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_success.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_various_queries[invoice from vendor].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_various_queries[meeting invitations].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_various_queries[password reset emails].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_various_queries[security alerts].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_various_queries[urgent emails from manager].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_with_filters[before:2025/01/01].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_with_filters[from:boss@company.com].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_with_filters[has:attachment].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_with_filters[label:important].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_gmail_search_with_filters[subject:urgent].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_outlook_search_api_error.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_outlook_search_calendar_events.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_outlook_search_no_results.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_outlook_search_success.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_outlook_search_various_queries[all-hands meeting].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_outlook_search_various_queries[budget review meeting].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_outlook_search_various_queries[client presentation tomorrow].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_outlook_search_various_queries[project deadline reminder].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_outlook_search_various_queries[team standup calendar].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_api_error.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_news_query.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_no_results.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_specific_domain.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_success.yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_various_queries[API design patterns].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_various_queries[Docker container deployment].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_various_queries[JavaScript frameworks comparison].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_various_queries[database optimization techniques].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/cassettes/test_web_search_various_queries[mobile app development].yaml +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/test_adapters.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/test_decorators.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/test_registry.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/test_toolspec.py +0 -0
- {glean_agent_toolkit-0.2.0 → glean_agent_toolkit-0.4.0}/tests/tools/__init__.py +0 -0
|
@@ -22,13 +22,13 @@ jobs:
|
|
|
22
22
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
23
23
|
|
|
24
24
|
- name: Setup development environment
|
|
25
|
-
run:
|
|
25
|
+
run: mise run setup
|
|
26
26
|
|
|
27
27
|
- name: Run linters
|
|
28
|
-
run:
|
|
28
|
+
run: mise run lint
|
|
29
29
|
|
|
30
30
|
- name: Build package
|
|
31
|
-
run:
|
|
31
|
+
run: mise run build
|
|
32
32
|
|
|
33
33
|
test:
|
|
34
34
|
name: Test Python ${{ matrix.python-version }}
|
|
@@ -44,23 +44,21 @@ jobs:
|
|
|
44
44
|
uses: jdx/mise-action@v2
|
|
45
45
|
with:
|
|
46
46
|
cache: true
|
|
47
|
-
mise_toml: |
|
|
48
|
-
[tools]
|
|
49
|
-
python = "${{ matrix.python-version }}"
|
|
50
|
-
task = "latest"
|
|
51
|
-
uv = "latest"
|
|
52
47
|
|
|
53
48
|
env:
|
|
54
49
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
55
50
|
|
|
56
51
|
- name: Setup development environment
|
|
57
|
-
run:
|
|
52
|
+
run: mise use -g python@${{ matrix.python-version }} uv@latest && mise install
|
|
53
|
+
|
|
54
|
+
- name: Initialize dev environment
|
|
55
|
+
run: mise run setup
|
|
58
56
|
|
|
59
57
|
- name: Run tests
|
|
60
|
-
run:
|
|
58
|
+
run: mise run test
|
|
61
59
|
|
|
62
60
|
- name: Test package installation
|
|
63
61
|
run: |
|
|
64
|
-
|
|
62
|
+
mise run build
|
|
65
63
|
uv run pip install dist/*.whl
|
|
66
64
|
uv run python -c "import glean.agent_toolkit; print('Package installed successfully')"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
3
|
+
rev: v4.4.1
|
|
4
|
+
hooks:
|
|
5
|
+
- id: commitizen
|
|
6
|
+
stages: [commit-msg]
|
|
7
|
+
|
|
8
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
9
|
+
rev: v4.5.0
|
|
10
|
+
hooks:
|
|
11
|
+
- id: trailing-whitespace
|
|
12
|
+
- id: end-of-file-fixer
|
|
13
|
+
- id: check-yaml
|
|
14
|
+
- id: check-added-large-files
|
|
15
|
+
- id: check-merge-conflict
|
|
16
|
+
- id: debug-statements
|
|
17
|
+
|
|
18
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
19
|
+
rev: v0.5.0
|
|
20
|
+
hooks:
|
|
21
|
+
- id: ruff
|
|
22
|
+
args: [--fix]
|
|
23
|
+
- id: ruff-format
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Agent Guidelines
|
|
2
|
+
|
|
3
|
+
This project contains the **Glean Agent Toolkit**, a Python package used to integrate Glean's search and discovery tools with various agent frameworks.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
1. Install the prerequisites:
|
|
8
|
+
- [uv](https://github.com/astral-sh/uv)
|
|
9
|
+
- [mise](https://mise.jdx.dev/)
|
|
10
|
+
2. Run `mise run setup` to create the `.venv` and install all development, test, lint and typing dependencies via `uv`.
|
|
11
|
+
|
|
12
|
+
Environment variables `GLEAN_API_TOKEN` and `GLEAN_SERVER_URL` (or deprecated `GLEAN_INSTANCE`) must be set to interact with Glean or regenerate VCR cassettes.
|
|
13
|
+
|
|
14
|
+
## Development Tasks
|
|
15
|
+
|
|
16
|
+
The repository uses **mise**. Key commands include:
|
|
17
|
+
|
|
18
|
+
| Task | Description |
|
|
19
|
+
|------|-------------|
|
|
20
|
+
| `mise run test` | Run unit tests |
|
|
21
|
+
| `mise run test:watch` | Run tests in watch mode |
|
|
22
|
+
| `mise run test:cov` | Run tests with coverage |
|
|
23
|
+
| `mise run test:all` | Run tests, apply lint fixes, and run pyright |
|
|
24
|
+
| `mise run lint` | Run Ruff, formatting checks and pyright |
|
|
25
|
+
| `mise run lint:diff` | Lint only changed files |
|
|
26
|
+
| `mise run lint:fix` | Apply Ruff fixes and formatting |
|
|
27
|
+
| `mise run format` | Format code using Ruff formatter |
|
|
28
|
+
| `mise run spell:check` | Check spelling |
|
|
29
|
+
| `mise run clean` | Remove build artifacts |
|
|
30
|
+
| `mise run build` | Build the package |
|
|
31
|
+
| `mise run release` | Bump version and generate the changelog |
|
|
32
|
+
|
|
33
|
+
Special tasks exist to manage VCR cassettes used in tests:
|
|
34
|
+
|
|
35
|
+
- `mise run test:vcr:regenerate` – Re-record all HTTP interactions (requires `GLEAN_API_TOKEN` and `GLEAN_SERVER_URL`; deprecated `GLEAN_INSTANCE` is still accepted as fallback).
|
|
36
|
+
- `mise run test:vcr:clean` – Delete cassettes so the next test run regenerates them.
|
|
37
|
+
|
|
38
|
+
## Coding Guidelines
|
|
39
|
+
|
|
40
|
+
- Python **>=3.10** is required. The project enforces formatting with Ruff. Line length is limited to **100** characters and double quotes are used by default.
|
|
41
|
+
- Docstrings follow the **Google** style as configured in `pyproject.toml`.
|
|
42
|
+
- Type checking is performed with **pyright**.
|
|
43
|
+
- Tools should be implemented using the `@tool_spec` decorator found in `glean.agent_toolkit.decorators`. See existing tools under `src/glean/agent_toolkit/tools` for examples.
|
|
44
|
+
|
|
45
|
+
## Contribution Process
|
|
46
|
+
|
|
47
|
+
1. Fork the repository and create a branch from `main`.
|
|
48
|
+
2. Make your changes and ensure all tasks run cleanly (`mise run test` and `mise run lint`).
|
|
49
|
+
3. Update or add documentation when necessary.
|
|
50
|
+
4. Submit a pull request.
|
|
51
|
+
5. Be respectful and follow the project's code of conduct.
|
|
52
|
+
|
|
53
|
+
## Additional Notes
|
|
54
|
+
|
|
55
|
+
Check the [README](README.md) for feature descriptions and basic usage. The package is released under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## 0.3.0 (2025-07-21)
|
|
2
|
+
|
|
3
|
+
### Feat
|
|
4
|
+
|
|
5
|
+
- Add enhanced parameter schemas with Field metadata support
|
|
6
|
+
|
|
7
|
+
### Fix
|
|
8
|
+
|
|
9
|
+
- Adds newline to .cz.toml
|
|
10
|
+
- Fixes type errors during task:lint
|
|
11
|
+
|
|
12
|
+
## 0.2.0 (2025-06-05)
|
|
13
|
+
|
|
14
|
+
### Feat
|
|
15
|
+
|
|
16
|
+
- Implements Agent Builder tools as defaults
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Commit Linting Setup
|
|
2
|
+
|
|
3
|
+
This project uses conventional commits with pre-commit hooks to ensure all commits follow the proper format.
|
|
4
|
+
|
|
5
|
+
## What is Conventional Commits?
|
|
6
|
+
|
|
7
|
+
Conventional Commits is a specification for commit messages that provides a standardized way to write commit messages. This makes it easier to:
|
|
8
|
+
|
|
9
|
+
- Automatically generate changelogs
|
|
10
|
+
- Determine semantic version bumps
|
|
11
|
+
- Communicate the nature of changes to teammates
|
|
12
|
+
|
|
13
|
+
Format: `<type>(<scope>): <description>`
|
|
14
|
+
|
|
15
|
+
Examples:
|
|
16
|
+
|
|
17
|
+
- `feat: add new search functionality`
|
|
18
|
+
- `fix(auth): resolve login issue`
|
|
19
|
+
- `docs: update README with new examples`
|
|
20
|
+
- `refactor(api): simplify response handling`
|
|
21
|
+
|
|
22
|
+
## Setup
|
|
23
|
+
|
|
24
|
+
### 1. Install Dependencies
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Install all dependencies including pre-commit
|
|
28
|
+
mise run setup
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This will:
|
|
32
|
+
|
|
33
|
+
- Install Python dependencies with `uv`
|
|
34
|
+
- Install pre-commit hooks automatically
|
|
35
|
+
|
|
36
|
+
### 2. Manual Pre-commit Setup (if needed)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Install pre-commit hooks
|
|
40
|
+
mise run pre-commit:install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Available Tools
|
|
44
|
+
|
|
45
|
+
### Pre-commit Hooks
|
|
46
|
+
|
|
47
|
+
Pre-commit hooks run automatically before each commit and will:
|
|
48
|
+
|
|
49
|
+
- Validate commit message format using Commitizen
|
|
50
|
+
- Run code formatting and linting with Ruff
|
|
51
|
+
- Check for common issues (trailing whitespace, merge conflicts, etc.)
|
|
52
|
+
|
|
53
|
+
**Commands:**
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Run pre-commit hooks on all files
|
|
57
|
+
mise run pre-commit:run
|
|
58
|
+
|
|
59
|
+
# Run pre-commit hooks on changed files only
|
|
60
|
+
mise run pre-commit:run:diff
|
|
61
|
+
|
|
62
|
+
# Update pre-commit hooks to latest versions
|
|
63
|
+
mise run pre-commit:update
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Making Commits
|
|
67
|
+
|
|
68
|
+
### Option 1: Use Commitizen (Recommended)
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Interactive commit creation
|
|
72
|
+
uv run python -m commitizen commit
|
|
73
|
+
|
|
74
|
+
# Or use the shorthand
|
|
75
|
+
uv run cz commit
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This will guide you through creating a conventional commit interactively.
|
|
79
|
+
|
|
80
|
+
### Option 2: Manual Commits
|
|
81
|
+
|
|
82
|
+
You can write commits manually, but they must follow the conventional commit format:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
git commit -m "feat: add new feature"
|
|
86
|
+
git commit -m "fix(auth): resolve login issue"
|
|
87
|
+
git commit -m "docs: update API documentation"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Option 3: Use Pre-commit with Conventional Commits
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Write your commit message
|
|
94
|
+
git add .
|
|
95
|
+
git commit -m "your message here"
|
|
96
|
+
|
|
97
|
+
# Pre-commit will validate and potentially fix issues
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Note:** Pre-commit hooks will automatically run and validate your commit message format.
|
|
101
|
+
|
|
102
|
+
## Commit Types
|
|
103
|
+
|
|
104
|
+
- `feat`: A new feature
|
|
105
|
+
- `fix`: A bug fix
|
|
106
|
+
- `docs`: Documentation only changes
|
|
107
|
+
- `style`: Changes that do not affect the meaning of the code
|
|
108
|
+
- `refactor`: A code change that neither fixes a bug nor adds a feature
|
|
109
|
+
- `perf`: A code change that improves performance
|
|
110
|
+
- `test`: Adding missing tests or correcting existing tests
|
|
111
|
+
- `build`: Changes that affect the build system or external dependencies
|
|
112
|
+
- `ci`: Changes to CI configuration files and scripts
|
|
113
|
+
- `chore`: Other changes that don't modify src or test files
|
|
114
|
+
- `revert`: Reverts a previous commit
|
|
115
|
+
|
|
116
|
+
## Troubleshooting
|
|
117
|
+
|
|
118
|
+
### Pre-commit Hook Not Running
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Reinstall pre-commit hooks
|
|
122
|
+
task pre-commit:install
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Commit Message Validation Failing
|
|
126
|
+
|
|
127
|
+
1. Use Commitizen for interactive commit creation:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
uv run python -m commitizen commit
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
2. Check the conventional commit format:
|
|
134
|
+
|
|
135
|
+
- Must start with a type: `feat`, `fix`, `docs`, etc.
|
|
136
|
+
- Optional scope in parentheses: `(auth)`, `(api)`, etc.
|
|
137
|
+
- Colon and space: `: `
|
|
138
|
+
- Description: `add new feature`
|
|
139
|
+
|
|
140
|
+
3. Examples of valid commits:
|
|
141
|
+
```bash
|
|
142
|
+
git commit -m "feat: add new search functionality"
|
|
143
|
+
git commit -m "fix(auth): resolve login timeout issue"
|
|
144
|
+
git commit -m "docs: update installation instructions"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Skipping Validation (Emergency Only)
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Skip pre-commit hooks (not recommended)
|
|
151
|
+
git commit -m "your message" --no-verify
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Configuration Files
|
|
155
|
+
|
|
156
|
+
- `.pre-commit-config.yaml`: Pre-commit hooks configuration
|
|
157
|
+
- `.cz.toml`: Commitizen configuration
|
|
158
|
+
- `pyproject.toml`: Project dependencies including pre-commit
|
|
159
|
+
|
|
160
|
+
## Benefits
|
|
161
|
+
|
|
162
|
+
1. **Consistent History**: All commits follow the same format
|
|
163
|
+
2. **Automated Changelogs**: Commitizen can generate changelogs automatically
|
|
164
|
+
3. **Semantic Versioning**: Automatic version bumping based on commit types
|
|
165
|
+
4. **Better Collaboration**: Clear communication about what each commit does
|
|
166
|
+
5. **Local Validation**: Immediate feedback before commits are made
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Contributing to Glean Agent Toolkit
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to the Glean Agent Toolkit! This guide will help you understand the project structure, development workflow, and how to add new tools.
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
src/
|
|
9
|
+
├─ glean/
|
|
10
|
+
│ ├─ __init__.py
|
|
11
|
+
│ └─ agent_toolkit/ # exposes `glean.agent_toolkit`
|
|
12
|
+
│ ├─ __init__.py
|
|
13
|
+
│ ├─ decorators.py
|
|
14
|
+
│ ├─ registry.py
|
|
15
|
+
│ ├─ spec.py
|
|
16
|
+
│ ├─ adapters/
|
|
17
|
+
│ ├─ tools/
|
|
18
|
+
│ └─ cli.py
|
|
19
|
+
├─ tests/
|
|
20
|
+
└─ docs/
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Development environment
|
|
24
|
+
|
|
25
|
+
The repository relies on [uv](https://github.com/astral-sh/uv) and [mise](https://mise.jdx.dev/) for reproducible workflows and task orchestration.
|
|
26
|
+
|
|
27
|
+
### Prerequisites
|
|
28
|
+
|
|
29
|
+
1. uv
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install uv
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
2. mise
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
brew install mise
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### One-time setup
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
mise run setup
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The command creates `.venv/` and installs all dev/test dependencies via uv.
|
|
48
|
+
|
|
49
|
+
## Development Tasks
|
|
50
|
+
|
|
51
|
+
The project uses `mise` to manage development tasks. Here are the available tasks:
|
|
52
|
+
|
|
53
|
+
### Testing
|
|
54
|
+
|
|
55
|
+
| Task | Description |
|
|
56
|
+
| --------------------- | ---------------------------- |
|
|
57
|
+
| `mise run test` | Run unit tests |
|
|
58
|
+
| `mise run test:watch` | Run tests in watch mode |
|
|
59
|
+
| `mise run test:cov` | Run tests with coverage |
|
|
60
|
+
| `mise run test:all` | Run all tests and lint fixes |
|
|
61
|
+
|
|
62
|
+
### Linting and formatting
|
|
63
|
+
|
|
64
|
+
| Task | Description |
|
|
65
|
+
| ----------------------- | --------------------------------------- |
|
|
66
|
+
| `mise run lint` | Run Ruff, pyright and formatting checks |
|
|
67
|
+
| `mise run lint:diff` | Same as above but only on changed files |
|
|
68
|
+
| `mise run lint:package` | Lint only `glean/toolkit` |
|
|
69
|
+
| `mise run lint:tests` | Lint only `tests` |
|
|
70
|
+
| `mise run lint:fix` | Autofix style issues |
|
|
71
|
+
| `mise run format` | Apply Ruff formatter |
|
|
72
|
+
| `mise run format:diff` | Format only changed files |
|
|
73
|
+
|
|
74
|
+
### Examples and Utilities
|
|
75
|
+
|
|
76
|
+
| Task | Description |
|
|
77
|
+
| ---------------------- | ----------------------------------------------- |
|
|
78
|
+
| `mise run spell:check` | Check spelling |
|
|
79
|
+
| `mise run spell:fix` | Fix spelling |
|
|
80
|
+
| `mise run clean` | Clean build artifacts |
|
|
81
|
+
| `mise run build` | Build the package |
|
|
82
|
+
| `mise run release` | Create a new release (version bump + changelog) |
|
|
83
|
+
| `mise run security:audit` | Run dependency vulnerability audit (pip-audit) |
|
|
84
|
+
|
|
85
|
+
## Pull Request Process
|
|
86
|
+
|
|
87
|
+
1. Fork the repository and create your branch from `main`.
|
|
88
|
+
2. Make your changes and ensure that all tests pass.
|
|
89
|
+
3. Update the documentation to reflect any changes.
|
|
90
|
+
4. Submit a pull request.
|
|
91
|
+
|
|
92
|
+
## Code of Conduct
|
|
93
|
+
|
|
94
|
+
Please be respectful and considerate of others when contributing to this project.
|