a2a-sdk 0.2.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.
- a2a_sdk-0.2.0/.coveragerc +8 -0
- a2a_sdk-0.2.0/.git-blame-ignore-revs +21 -0
- a2a_sdk-0.2.0/.github/CODEOWNERS +7 -0
- a2a_sdk-0.2.0/.github/ISSUE_TEMPLATE/bug-report.yml +33 -0
- a2a_sdk-0.2.0/.github/ISSUE_TEMPLATE/feature-request.yml +41 -0
- a2a_sdk-0.2.0/.github/PULL_REQUEST_TEMPLATE.md +11 -0
- a2a_sdk-0.2.0/.github/actions/spelling/advice.md +28 -0
- a2a_sdk-0.2.0/.github/actions/spelling/allow.txt +35 -0
- a2a_sdk-0.2.0/.github/actions/spelling/excludes.txt +89 -0
- a2a_sdk-0.2.0/.github/actions/spelling/line_forbidden.patterns +307 -0
- a2a_sdk-0.2.0/.github/conventional-commit-lint.yaml +2 -0
- a2a_sdk-0.2.0/.github/linters/.jscpd.json +5 -0
- a2a_sdk-0.2.0/.github/linters/.markdownlint.json +4 -0
- a2a_sdk-0.2.0/.github/workflows/linter.yaml +65 -0
- a2a_sdk-0.2.0/.github/workflows/python-publish.yml +55 -0
- a2a_sdk-0.2.0/.github/workflows/spelling.yaml +85 -0
- a2a_sdk-0.2.0/.github/workflows/stale.yaml +49 -0
- a2a_sdk-0.2.0/.gitignore +10 -0
- a2a_sdk-0.2.0/.python-version +1 -0
- a2a_sdk-0.2.0/.ruff.toml +128 -0
- a2a_sdk-0.2.0/.vscode/launch.json +31 -0
- a2a_sdk-0.2.0/.vscode/settings.json +14 -0
- a2a_sdk-0.2.0/CODE_OF_CONDUCT.md +96 -0
- a2a_sdk-0.2.0/CONTRIBUTING.md +57 -0
- a2a_sdk-0.2.0/LICENSE +202 -0
- a2a_sdk-0.2.0/PKG-INFO +54 -0
- a2a_sdk-0.2.0/README.md +38 -0
- a2a_sdk-0.2.0/SECURITY.md +7 -0
- a2a_sdk-0.2.0/examples/google_adk/__init__.py +0 -0
- a2a_sdk-0.2.0/examples/google_adk/birthday_planner/README.md +27 -0
- a2a_sdk-0.2.0/examples/google_adk/birthday_planner/__init__.py +0 -0
- a2a_sdk-0.2.0/examples/google_adk/birthday_planner/__main__.py +82 -0
- a2a_sdk-0.2.0/examples/google_adk/birthday_planner/adk_agent_executor.py +366 -0
- a2a_sdk-0.2.0/examples/google_adk/birthday_planner/pyproject.toml +26 -0
- a2a_sdk-0.2.0/examples/google_adk/calendar_agent/README.md +27 -0
- a2a_sdk-0.2.0/examples/google_adk/calendar_agent/__init__.py +0 -0
- a2a_sdk-0.2.0/examples/google_adk/calendar_agent/__main__.py +109 -0
- a2a_sdk-0.2.0/examples/google_adk/calendar_agent/adk_agent.py +27 -0
- a2a_sdk-0.2.0/examples/google_adk/calendar_agent/adk_agent_executor.py +324 -0
- a2a_sdk-0.2.0/examples/google_adk/calendar_agent/pyproject.toml +27 -0
- a2a_sdk-0.2.0/examples/helloworld/README.md +17 -0
- a2a_sdk-0.2.0/examples/helloworld/__init__.py +0 -0
- a2a_sdk-0.2.0/examples/helloworld/__main__.py +45 -0
- a2a_sdk-0.2.0/examples/helloworld/agent_executor.py +34 -0
- a2a_sdk-0.2.0/examples/helloworld/pyproject.toml +27 -0
- a2a_sdk-0.2.0/examples/helloworld/test_client.py +45 -0
- a2a_sdk-0.2.0/examples/langgraph/README.md +23 -0
- a2a_sdk-0.2.0/examples/langgraph/__init__.py +0 -0
- a2a_sdk-0.2.0/examples/langgraph/__main__.py +69 -0
- a2a_sdk-0.2.0/examples/langgraph/agent.py +151 -0
- a2a_sdk-0.2.0/examples/langgraph/agent_executor.py +97 -0
- a2a_sdk-0.2.0/examples/langgraph/helpers.py +95 -0
- a2a_sdk-0.2.0/examples/langgraph/pyproject.toml +27 -0
- a2a_sdk-0.2.0/examples/langgraph/test_client.py +164 -0
- a2a_sdk-0.2.0/noxfile.py +144 -0
- a2a_sdk-0.2.0/pyproject.toml +48 -0
- a2a_sdk-0.2.0/src/a2a/__init__.py +0 -0
- a2a_sdk-0.2.0/src/a2a/client/__init__.py +17 -0
- a2a_sdk-0.2.0/src/a2a/client/client.py +234 -0
- a2a_sdk-0.2.0/src/a2a/client/errors.py +19 -0
- a2a_sdk-0.2.0/src/a2a/client/helpers.py +12 -0
- a2a_sdk-0.2.0/src/a2a/py.typed +0 -0
- a2a_sdk-0.2.0/src/a2a/server/__init__.py +0 -0
- a2a_sdk-0.2.0/src/a2a/server/agent_execution/__init__.py +5 -0
- a2a_sdk-0.2.0/src/a2a/server/agent_execution/agent_executor.py +16 -0
- a2a_sdk-0.2.0/src/a2a/server/agent_execution/context.py +98 -0
- a2a_sdk-0.2.0/src/a2a/server/apps/__init__.py +5 -0
- a2a_sdk-0.2.0/src/a2a/server/apps/http_app.py +12 -0
- a2a_sdk-0.2.0/src/a2a/server/apps/starlette_app.py +306 -0
- a2a_sdk-0.2.0/src/a2a/server/events/__init__.py +19 -0
- a2a_sdk-0.2.0/src/a2a/server/events/event_consumer.py +96 -0
- a2a_sdk-0.2.0/src/a2a/server/events/event_queue.py +71 -0
- a2a_sdk-0.2.0/src/a2a/server/events/in_memory_queue_manager.py +55 -0
- a2a_sdk-0.2.0/src/a2a/server/events/queue_manager.py +35 -0
- a2a_sdk-0.2.0/src/a2a/server/request_handlers/__init__.py +18 -0
- a2a_sdk-0.2.0/src/a2a/server/request_handlers/default_request_handler.py +256 -0
- a2a_sdk-0.2.0/src/a2a/server/request_handlers/jsonrpc_handler.py +234 -0
- a2a_sdk-0.2.0/src/a2a/server/request_handlers/request_handler.py +58 -0
- a2a_sdk-0.2.0/src/a2a/server/request_handlers/response_helpers.py +100 -0
- a2a_sdk-0.2.0/src/a2a/server/tasks/__init__.py +14 -0
- a2a_sdk-0.2.0/src/a2a/server/tasks/inmemory_task_store.py +43 -0
- a2a_sdk-0.2.0/src/a2a/server/tasks/result_aggregator.py +90 -0
- a2a_sdk-0.2.0/src/a2a/server/tasks/task_manager.py +183 -0
- a2a_sdk-0.2.0/src/a2a/server/tasks/task_store.py +19 -0
- a2a_sdk-0.2.0/src/a2a/server/tasks/task_updater.py +93 -0
- a2a_sdk-0.2.0/src/a2a/types.py +1360 -0
- a2a_sdk-0.2.0/src/a2a/utils/__init__.py +24 -0
- a2a_sdk-0.2.0/src/a2a/utils/artifact.py +16 -0
- a2a_sdk-0.2.0/src/a2a/utils/errors.py +50 -0
- a2a_sdk-0.2.0/src/a2a/utils/helpers.py +103 -0
- a2a_sdk-0.2.0/src/a2a/utils/message.py +30 -0
- a2a_sdk-0.2.0/src/a2a/utils/task.py +14 -0
- a2a_sdk-0.2.0/src/a2a/utils/telemetry.py +284 -0
- a2a_sdk-0.2.0/tests/client/test_client.py +637 -0
- a2a_sdk-0.2.0/tests/server/events/test_event_consumer.py +221 -0
- a2a_sdk-0.2.0/tests/server/events/test_event_queue.py +104 -0
- a2a_sdk-0.2.0/tests/server/request_handlers/test_jsonrpc_handler.py +452 -0
- a2a_sdk-0.2.0/tests/server/tasks/test_inmemory_task_store.py +50 -0
- a2a_sdk-0.2.0/tests/server/tasks/test_task_manager.py +262 -0
- a2a_sdk-0.2.0/tests/test_types.py +1411 -0
- a2a_sdk-0.2.0/uv.lock +1944 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Template taken from https://github.com/v8/v8/blob/master/.git-blame-ignore-revs.
|
|
2
|
+
#
|
|
3
|
+
# This file contains a list of git hashes of revisions to be ignored by git blame. These
|
|
4
|
+
# revisions are considered "unimportant" in that they are unlikely to be what you are
|
|
5
|
+
# interested in when blaming. Most of these will probably be commits related to linting
|
|
6
|
+
# and code formatting.
|
|
7
|
+
#
|
|
8
|
+
# Instructions:
|
|
9
|
+
# - Only large (generally automated) reformatting or renaming CLs should be
|
|
10
|
+
# added to this list. Do not put things here just because you feel they are
|
|
11
|
+
# trivial or unimportant. If in doubt, do not put it on this list.
|
|
12
|
+
# - Precede each revision with a comment containing the PR title and number.
|
|
13
|
+
# For bulk work over many commits, place all commits in a block with a single
|
|
14
|
+
# comment at the top describing the work done in those commits.
|
|
15
|
+
# - Only put full 40-character hashes on this list (not short hashes or any
|
|
16
|
+
# other revision reference).
|
|
17
|
+
# - Append to the bottom of the file (revisions should be in chronological order
|
|
18
|
+
# from oldest to newest).
|
|
19
|
+
# - Because you must use a hash, you need to append to this list in a follow-up
|
|
20
|
+
# PR to the actual reformatting PR that you are trying to ignore.
|
|
21
|
+
193693836e1ed8cd361e139668323d2e267a9eaa
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: 🐞 Bug Report
|
|
2
|
+
description: File a bug report
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
type: "Bug"
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for stopping by to let us know something could be better!
|
|
10
|
+
Private Feedback? Please use this [Google form](https://goo.gle/a2a-feedback)
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: what-happened
|
|
13
|
+
attributes:
|
|
14
|
+
label: What happened?
|
|
15
|
+
description: Also tell us what you expected to happen and how to reproduce the issue.
|
|
16
|
+
placeholder: Tell us what you see!
|
|
17
|
+
value: "A bug happened!"
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: logs
|
|
22
|
+
attributes:
|
|
23
|
+
label: Relevant log output
|
|
24
|
+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
|
25
|
+
render: shell
|
|
26
|
+
- type: checkboxes
|
|
27
|
+
id: terms
|
|
28
|
+
attributes:
|
|
29
|
+
label: Code of Conduct
|
|
30
|
+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/google/A2A?tab=coc-ov-file#readme)
|
|
31
|
+
options:
|
|
32
|
+
- label: I agree to follow this project's Code of Conduct
|
|
33
|
+
required: true
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: 💡 Feature Request
|
|
2
|
+
description: Suggest an idea for this repository
|
|
3
|
+
title: "[Feat]: "
|
|
4
|
+
type: "Feature"
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for stopping by to let us know something could be better!
|
|
10
|
+
Private Feedback? Please use this [Google form](https://goo.gle/a2a-feedback)
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: problem
|
|
13
|
+
attributes:
|
|
14
|
+
label: Is your feature request related to a problem? Please describe.
|
|
15
|
+
description: A clear and concise description of what the problem is.
|
|
16
|
+
placeholder: Ex. I'm always frustrated when [...]
|
|
17
|
+
- type: textarea
|
|
18
|
+
id: describe
|
|
19
|
+
attributes:
|
|
20
|
+
label: Describe the solution you'd like
|
|
21
|
+
description: A clear and concise description of what you want to happen.
|
|
22
|
+
validations:
|
|
23
|
+
required: true
|
|
24
|
+
- type: textarea
|
|
25
|
+
id: alternatives
|
|
26
|
+
attributes:
|
|
27
|
+
label: Describe alternatives you've considered
|
|
28
|
+
description: A clear and concise description of any alternative solutions or features you've considered.
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: context
|
|
31
|
+
attributes:
|
|
32
|
+
label: Additional context
|
|
33
|
+
description: Add any other context or screenshots about the feature request here.
|
|
34
|
+
- type: checkboxes
|
|
35
|
+
id: terms
|
|
36
|
+
attributes:
|
|
37
|
+
label: Code of Conduct
|
|
38
|
+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/google/a2a-python?tab=coc-ov-file#readme)
|
|
39
|
+
options:
|
|
40
|
+
- label: I agree to follow this project's Code of Conduct
|
|
41
|
+
required: true
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Description
|
|
2
|
+
|
|
3
|
+
Thank you for opening a Pull Request!
|
|
4
|
+
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
|
|
5
|
+
|
|
6
|
+
- [ ] Follow the [`CONTRIBUTING` Guide](https://github.com/google/a2a-python/blob/main/CONTRIBUTING.md).
|
|
7
|
+
- [ ] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification.
|
|
8
|
+
- [ ] Ensure the tests and linter pass (Run `nox -s format` from the repository root to format)
|
|
9
|
+
- [ ] Appropriate docs were updated (if necessary)
|
|
10
|
+
|
|
11
|
+
Fixes #<issue_number_goes_here> 🦕
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
|
|
2
|
+
<details><summary>If the flagged items are :exploding_head: false positives</summary>
|
|
3
|
+
|
|
4
|
+
If items relate to a ...
|
|
5
|
+
|
|
6
|
+
- binary file (or some other file you wouldn't want to check at all).
|
|
7
|
+
|
|
8
|
+
Please add a file path to the `excludes.txt` file matching the containing file.
|
|
9
|
+
|
|
10
|
+
File paths are Perl 5 Regular Expressions - you can [test](https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
|
|
11
|
+
|
|
12
|
+
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude `README.md` (on whichever branch you're using).
|
|
13
|
+
|
|
14
|
+
- well-formed pattern.
|
|
15
|
+
|
|
16
|
+
If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
|
|
17
|
+
try adding it to the `patterns.txt` file.
|
|
18
|
+
|
|
19
|
+
Patterns are Perl 5 Regular Expressions - you can [test](https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
|
|
20
|
+
|
|
21
|
+
Note that patterns can't match multiline strings.
|
|
22
|
+
|
|
23
|
+
</details>
|
|
24
|
+
|
|
25
|
+
<!-- adoption information-->
|
|
26
|
+
|
|
27
|
+
:steam_locomotive: If you're seeing this message and your PR is from a branch that doesn't have check-spelling,
|
|
28
|
+
please merge to your PR's base branch to get the version configured for your repository.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
ACard
|
|
2
|
+
AClient
|
|
3
|
+
AError
|
|
4
|
+
ARequest
|
|
5
|
+
ARun
|
|
6
|
+
AServer
|
|
7
|
+
AStarlette
|
|
8
|
+
EUR
|
|
9
|
+
GBP
|
|
10
|
+
INR
|
|
11
|
+
JPY
|
|
12
|
+
JSONRPCt
|
|
13
|
+
Llm
|
|
14
|
+
aconnect
|
|
15
|
+
adk
|
|
16
|
+
autouse
|
|
17
|
+
cla
|
|
18
|
+
cls
|
|
19
|
+
coc
|
|
20
|
+
codegen
|
|
21
|
+
coro
|
|
22
|
+
datamodel
|
|
23
|
+
dunders
|
|
24
|
+
genai
|
|
25
|
+
gle
|
|
26
|
+
inmemory
|
|
27
|
+
langgraph
|
|
28
|
+
lifecycles
|
|
29
|
+
linting
|
|
30
|
+
oauthoidc
|
|
31
|
+
opensource
|
|
32
|
+
socio
|
|
33
|
+
sse
|
|
34
|
+
tagwords
|
|
35
|
+
vulnz
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
|
|
2
|
+
(?:^|/)(?i)COPYRIGHT
|
|
3
|
+
(?:^|/)(?i)LICEN[CS]E
|
|
4
|
+
(?:^|/)(?i)CODE_OF_CONDUCT.md\E$
|
|
5
|
+
(?:^|/)(?i).gitignore\E$
|
|
6
|
+
(?:^|/)3rdparty/
|
|
7
|
+
(?:^|/)go\.sum$
|
|
8
|
+
(?:^|/)package(?:-lock|)\.json$
|
|
9
|
+
(?:^|/)Pipfile$
|
|
10
|
+
(?:^|/)pyproject.toml
|
|
11
|
+
(?:^|/)requirements(?:-dev|-doc|-test|)\.txt$
|
|
12
|
+
(?:^|/)vendor/
|
|
13
|
+
/CODEOWNERS$
|
|
14
|
+
\.a$
|
|
15
|
+
\.ai$
|
|
16
|
+
\.all-contributorsrc$
|
|
17
|
+
\.avi$
|
|
18
|
+
\.bmp$
|
|
19
|
+
\.bz2$
|
|
20
|
+
\.cer$
|
|
21
|
+
\.class$
|
|
22
|
+
\.coveragerc$
|
|
23
|
+
\.crl$
|
|
24
|
+
\.crt$
|
|
25
|
+
\.csr$
|
|
26
|
+
\.dll$
|
|
27
|
+
\.docx?$
|
|
28
|
+
\.drawio$
|
|
29
|
+
\.DS_Store$
|
|
30
|
+
\.eot$
|
|
31
|
+
\.eps$
|
|
32
|
+
\.exe$
|
|
33
|
+
\.gif$
|
|
34
|
+
\.git-blame-ignore-revs$
|
|
35
|
+
\.gitattributes$
|
|
36
|
+
\.gitkeep$
|
|
37
|
+
\.graffle$
|
|
38
|
+
\.gz$
|
|
39
|
+
\.icns$
|
|
40
|
+
\.ico$
|
|
41
|
+
\.jar$
|
|
42
|
+
\.jks$
|
|
43
|
+
\.jpe?g$
|
|
44
|
+
\.key$
|
|
45
|
+
\.lib$
|
|
46
|
+
\.lock$
|
|
47
|
+
\.map$
|
|
48
|
+
\.min\..
|
|
49
|
+
\.mo$
|
|
50
|
+
\.mod$
|
|
51
|
+
\.mp[34]$
|
|
52
|
+
\.o$
|
|
53
|
+
\.ocf$
|
|
54
|
+
\.otf$
|
|
55
|
+
\.p12$
|
|
56
|
+
\.parquet$
|
|
57
|
+
\.pdf$
|
|
58
|
+
\.pem$
|
|
59
|
+
\.pfx$
|
|
60
|
+
\.png$
|
|
61
|
+
\.psd$
|
|
62
|
+
\.pyc$
|
|
63
|
+
\.pylintrc$
|
|
64
|
+
\.qm$
|
|
65
|
+
\.s$
|
|
66
|
+
\.sig$
|
|
67
|
+
\.so$
|
|
68
|
+
\.svgz?$
|
|
69
|
+
\.sys$
|
|
70
|
+
\.tar$
|
|
71
|
+
\.tgz$
|
|
72
|
+
\.tiff?$
|
|
73
|
+
\.ttf$
|
|
74
|
+
\.wav$
|
|
75
|
+
\.webm$
|
|
76
|
+
\.webp$
|
|
77
|
+
\.woff2?$
|
|
78
|
+
\.xcf$
|
|
79
|
+
\.xlsx?$
|
|
80
|
+
\.xpm$
|
|
81
|
+
\.xz$
|
|
82
|
+
\.zip$
|
|
83
|
+
^\.github/actions/spelling/
|
|
84
|
+
^\Q.github/workflows/spelling.yaml\E$
|
|
85
|
+
^\Q.github/workflows/linter.yaml\E$
|
|
86
|
+
\.gitignore\E$
|
|
87
|
+
\.vscode/
|
|
88
|
+
noxfile.py
|
|
89
|
+
\.ruff.toml$
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# Should be `HH:MM:SS`
|
|
2
|
+
\bHH:SS:MM\b
|
|
3
|
+
|
|
4
|
+
# Should probably be `YYYYMMDD`
|
|
5
|
+
\b[Yy]{4}[Dd]{2}[Mm]{2}(?!.*[Yy]{4}[Dd]{2}[Mm]{2}).*$
|
|
6
|
+
|
|
7
|
+
# Should be `anymore`
|
|
8
|
+
\bany more[,.]
|
|
9
|
+
|
|
10
|
+
# Should be `cannot` (or `can't`)
|
|
11
|
+
# See https://www.grammarly.com/blog/cannot-or-can-not/
|
|
12
|
+
# > Don't use `can not` when you mean `cannot`. The only time you're likely to see `can not` written as separate words is when the word `can` happens to precede some other phrase that happens to start with `not`.
|
|
13
|
+
# > `Can't` is a contraction of `cannot`, and it's best suited for informal writing.
|
|
14
|
+
# > In formal writing and where contractions are frowned upon, use `cannot`.
|
|
15
|
+
# > It is possible to write `can not`, but you generally find it only as part of some other construction, such as `not only . . . but also.`
|
|
16
|
+
# - if you encounter such a case, add a pattern for that case to patterns.txt.
|
|
17
|
+
\b[Cc]an not\b
|
|
18
|
+
|
|
19
|
+
# Should be `GitHub`
|
|
20
|
+
(?<![&*.]|// |\btype |\bimport )\bGithub\b(?![{()])
|
|
21
|
+
\b[Gg]it\s[Hh]ub\b
|
|
22
|
+
|
|
23
|
+
# Should be `GitLab`
|
|
24
|
+
(?<![&*.]|// |\btype )\bGitlab\b(?![{)])
|
|
25
|
+
|
|
26
|
+
# Should be `JavaScript`
|
|
27
|
+
\bJavascript\b
|
|
28
|
+
|
|
29
|
+
# Should be `macOS` or `Mac OS X` or ...
|
|
30
|
+
\bMacOS\b
|
|
31
|
+
|
|
32
|
+
# Should be `Microsoft`
|
|
33
|
+
\bMicroSoft\b
|
|
34
|
+
|
|
35
|
+
# Should be `OAuth`
|
|
36
|
+
(?:^|[^-/*$])[ '"]oAuth(?: [a-z]|\d+ |[^ a-zA-Z0-9:;_.()])
|
|
37
|
+
|
|
38
|
+
# Should be `TypeScript`
|
|
39
|
+
\bTypescript\b
|
|
40
|
+
|
|
41
|
+
# Should be `another`
|
|
42
|
+
\ban[- ]other\b
|
|
43
|
+
|
|
44
|
+
# Should be `case-(in)sensitive`
|
|
45
|
+
\bcase (?:in|)sensitive\b
|
|
46
|
+
|
|
47
|
+
# Should be `coinciding`
|
|
48
|
+
\bco-inciding\b
|
|
49
|
+
|
|
50
|
+
# Should be `deprecation warning(s)`
|
|
51
|
+
\b[Dd]epreciation [Ww]arnings?\b
|
|
52
|
+
|
|
53
|
+
# Should be `greater than`
|
|
54
|
+
\bgreater then\b
|
|
55
|
+
|
|
56
|
+
# Should be `ID`
|
|
57
|
+
#\bId\b
|
|
58
|
+
|
|
59
|
+
# Should be `in front of`
|
|
60
|
+
\bin from of\b
|
|
61
|
+
|
|
62
|
+
# Should be `into`
|
|
63
|
+
# when not phrasal and when `in order to` would be wrong:
|
|
64
|
+
# https://thewritepractice.com/into-vs-in-to/
|
|
65
|
+
\sin to\s(?!if\b)
|
|
66
|
+
|
|
67
|
+
# Should be `use`
|
|
68
|
+
\sin used by\b
|
|
69
|
+
|
|
70
|
+
# Should be `is obsolete`
|
|
71
|
+
\bis obsolescent\b
|
|
72
|
+
|
|
73
|
+
# Should be `it's` or `its`
|
|
74
|
+
\bits[']
|
|
75
|
+
|
|
76
|
+
# Should be `its`
|
|
77
|
+
\bit's(?= own\b)
|
|
78
|
+
|
|
79
|
+
# Should be `perform its`
|
|
80
|
+
\bperform it's\b
|
|
81
|
+
|
|
82
|
+
# Should be `opt-in`
|
|
83
|
+
(?<!\sfor)\sopt in\s
|
|
84
|
+
|
|
85
|
+
# Should be `less than`
|
|
86
|
+
\bless then\b
|
|
87
|
+
|
|
88
|
+
# Should be `load balancer`
|
|
89
|
+
\b[Ll]oud balancer
|
|
90
|
+
|
|
91
|
+
# Should be `one of`
|
|
92
|
+
\bon of\b
|
|
93
|
+
|
|
94
|
+
# Should be `otherwise`
|
|
95
|
+
\bother[- ]wise\b
|
|
96
|
+
|
|
97
|
+
# Should be `or (more|less)`
|
|
98
|
+
\bore (?:more|less)\b
|
|
99
|
+
|
|
100
|
+
# Should be `rather than`
|
|
101
|
+
\brather then\b
|
|
102
|
+
|
|
103
|
+
# Should be `regardless, ...` or `regardless of (whether)`
|
|
104
|
+
\b[Rr]egardless if you\b
|
|
105
|
+
|
|
106
|
+
# Should be `no longer needed`
|
|
107
|
+
\bno more needed\b(?! than\b)
|
|
108
|
+
|
|
109
|
+
# Should be `did not exist`
|
|
110
|
+
\bwere not existent\b
|
|
111
|
+
|
|
112
|
+
# Should be `nonexistent`
|
|
113
|
+
\bnon existing\b
|
|
114
|
+
|
|
115
|
+
# Should be `nonexistent`
|
|
116
|
+
\b[Nn]o[nt][- ]existent\b
|
|
117
|
+
|
|
118
|
+
# Should be `@brief` / `@details` / `@param` / `@return` / `@retval`
|
|
119
|
+
(?:^\s*|(?:\*|//|/*)\s+`)[\\@](?:breif|(?:detail|detials)|(?:params(?!\.)|prama?)|ret(?:uns?)|retvl)\b
|
|
120
|
+
|
|
121
|
+
# Should be `preexisting`
|
|
122
|
+
[Pp]re[- ]existing
|
|
123
|
+
|
|
124
|
+
# Should be `preempt`
|
|
125
|
+
[Pp]re[- ]empt\b
|
|
126
|
+
|
|
127
|
+
# Should be `preemptively`
|
|
128
|
+
[Pp]re[- ]emptively
|
|
129
|
+
|
|
130
|
+
# Should be `recently changed` or `recent changes`
|
|
131
|
+
[Rr]ecent changed
|
|
132
|
+
|
|
133
|
+
# Should be `reentrancy`
|
|
134
|
+
[Rr]e[- ]entrancy
|
|
135
|
+
|
|
136
|
+
# Should be `reentrant`
|
|
137
|
+
[Rr]e[- ]entrant
|
|
138
|
+
|
|
139
|
+
# Should be `understand`
|
|
140
|
+
\bunder stand\b
|
|
141
|
+
|
|
142
|
+
# Should be `workarounds`
|
|
143
|
+
\bwork[- ]arounds\b
|
|
144
|
+
|
|
145
|
+
# Should be `workaround`
|
|
146
|
+
(?:(?:[Aa]|[Tt]he|ugly)\swork[- ]around\b|\swork[- ]around\s+for)
|
|
147
|
+
|
|
148
|
+
# Should be `(coarse|fine)-grained`
|
|
149
|
+
\b(?:coarse|fine) grained\b
|
|
150
|
+
|
|
151
|
+
# Should be `neither/nor` -- or reword
|
|
152
|
+
\bnot\b[^.?!"/(]+\bnor\b
|
|
153
|
+
|
|
154
|
+
# Should be `neither/nor` (plus rewording the beginning)
|
|
155
|
+
# This is probably a double negative...
|
|
156
|
+
\bnot\b[^.?!"/]*\bneither\b[^.?!"/(]*\bnor\b
|
|
157
|
+
|
|
158
|
+
# In English, duplicated words are generally mistakes
|
|
159
|
+
# There are a few exceptions (e.g. "that that").
|
|
160
|
+
# If the highlighted doubled word pair is in:
|
|
161
|
+
# * code, write a pattern to mask it.
|
|
162
|
+
# * prose, have someone read the English before you dismiss this error.
|
|
163
|
+
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
|
|
164
|
+
|
|
165
|
+
# Should be `Gen AI`
|
|
166
|
+
\b[gG]enAI\b
|
|
167
|
+
|
|
168
|
+
# Should be LangChain
|
|
169
|
+
\b(?!LangChain\b)(?!langchain\b)[Ll]ang\s?[Cc]hain?\b
|
|
170
|
+
|
|
171
|
+
# Should be LangGraph
|
|
172
|
+
\b(?!LangGraph\b)(?!langgraph\b)[Ll]ang\s?[Gg]raph?\b
|
|
173
|
+
|
|
174
|
+
# Should be LangServe
|
|
175
|
+
\b(?!LangServe\b)(?!langserve\b)[Ll]ang\s?[Ss]erve?\b
|
|
176
|
+
|
|
177
|
+
# Should be LlamaIndex
|
|
178
|
+
\b(?!LlamaIndex\b)[Ll][Ll]ama\s?[Ii]ndex?\s
|
|
179
|
+
|
|
180
|
+
# Should be Hugging Face
|
|
181
|
+
\s(?!Hugging Face\b)[Hh]ugging\s?[Ff]ace?\b
|
|
182
|
+
|
|
183
|
+
# Should be DeepSeek
|
|
184
|
+
\b(?!DeepSeek\b)(?!deepseek\b)[Dd]eep\s?[Ss]eek?\b
|
|
185
|
+
|
|
186
|
+
# Should be Vertex AI
|
|
187
|
+
\b(?!Vertex AI\b)(?!.*[\(\)\{\},])(?<!import\s)(?<!\.)(?<!,\s)Vertex\s?[Aa]?[Ii]?\b
|
|
188
|
+
|
|
189
|
+
# Should be Vertex AI
|
|
190
|
+
\b[Vv]ertext\b
|
|
191
|
+
|
|
192
|
+
# Should be Gemini
|
|
193
|
+
\sgemini\s\w
|
|
194
|
+
|
|
195
|
+
# Should be `Gemini Version Size` (e.g. `Gemini 2.0 Flash`)
|
|
196
|
+
\bGemini\s(Pro|Flash|Ultra)\s?\d\.\d\b
|
|
197
|
+
|
|
198
|
+
# Gemini Size should be capitalized (e.g. `Gemini 2.0 Flash`)
|
|
199
|
+
\bGemini\s?\d\.\d\s(pro|flash|ultra)\b
|
|
200
|
+
|
|
201
|
+
# Don't say "Google Gemini" or "Google Gemini"
|
|
202
|
+
\b[Gg]oogle(?: [Cc]loud| [Dd]eep[Mm]ind)?'s [Gg]emini\b
|
|
203
|
+
|
|
204
|
+
# Don't say "Powered by Gemini", instead say "with Gemini"
|
|
205
|
+
\b[Pp]owered\s[Bb]y\s[Gg]emini\b
|
|
206
|
+
|
|
207
|
+
# Should be Gemini API in Vertex AI
|
|
208
|
+
\b[Vv]ertex\s[Aa][Ii]\s[Gg]emini\s[Aa][Pp][Ii]\b
|
|
209
|
+
|
|
210
|
+
# Should be Agentspace
|
|
211
|
+
\b(?!Agentspace\b)[Aa]gent\s?[Ss]pace?\b
|
|
212
|
+
|
|
213
|
+
# Should be Imagen
|
|
214
|
+
\simagen\s\w
|
|
215
|
+
|
|
216
|
+
# Should be Imagen 2 or Imagen 3
|
|
217
|
+
\bImagen\d\b
|
|
218
|
+
|
|
219
|
+
# Should be BigQuery
|
|
220
|
+
\b(?!BigQuery\b)(?!bigquery\b)[Bb]ig\s?[Qq]uery\b
|
|
221
|
+
|
|
222
|
+
# Should be DataFrame or DataFrames
|
|
223
|
+
\b(?!DataFrames?\b)(?!.*[\(\)\{\}\.,=])(?<!")\b[Dd]ata\s?[Ff]rames?\b(?!")
|
|
224
|
+
|
|
225
|
+
# Should be Google Cloud
|
|
226
|
+
\s[Gg][Cc][Pp]\s
|
|
227
|
+
|
|
228
|
+
# Should be Google Cloud
|
|
229
|
+
\b(?!Google\sCloud\b)[Gg]oogle\s?[Cc]loud\b
|
|
230
|
+
|
|
231
|
+
# Should be DeepMind
|
|
232
|
+
\b(?!DeepMind\b)[Dd]eep\s?[Mm]ind\b
|
|
233
|
+
|
|
234
|
+
# Should be TensorFlow
|
|
235
|
+
\b(?!TensorFlow\b)(?!tensorflow\b)[Tt]ensor\s?[Ff]low\b
|
|
236
|
+
|
|
237
|
+
# Should be AlloyDB
|
|
238
|
+
\b(?!AlloyDB\b)(?!alloydb\b)[Aa]lloy\s?[Dd]\s?[Bb]\b
|
|
239
|
+
|
|
240
|
+
# Should be Translation API
|
|
241
|
+
\bTranslate\s?API\b
|
|
242
|
+
|
|
243
|
+
# Should be Dialogflow
|
|
244
|
+
\bDialogFlow\b
|
|
245
|
+
|
|
246
|
+
# Should be Firebase
|
|
247
|
+
\b(?!Firebase\b)Fire\s?[Bb]ase\b
|
|
248
|
+
|
|
249
|
+
# Should be Firestore
|
|
250
|
+
\b(?!Firestore\b)Fire\s?[Ss]tore\b
|
|
251
|
+
|
|
252
|
+
# Should be Memorystore
|
|
253
|
+
\b(?!Memorystore\b)Memory\s?[Ss]tore\b
|
|
254
|
+
|
|
255
|
+
# Should be Document AI
|
|
256
|
+
\bDoc\s?AI\b
|
|
257
|
+
|
|
258
|
+
# Should be Vertex AI Search
|
|
259
|
+
\bVertex\s?Search\b
|
|
260
|
+
|
|
261
|
+
# Should be Vertex AI Vector Search
|
|
262
|
+
\bVertex\sVector\sSearch\b
|
|
263
|
+
|
|
264
|
+
# Should be Colab
|
|
265
|
+
\s(?!Colab)[Cc]o[Ll][Ll]?abs?\b
|
|
266
|
+
|
|
267
|
+
# Should be Kaggle
|
|
268
|
+
\skaggle\b
|
|
269
|
+
|
|
270
|
+
# Should be TPU or TPUs
|
|
271
|
+
\btpus?\b
|
|
272
|
+
|
|
273
|
+
# Should be GKE
|
|
274
|
+
\sgke\s
|
|
275
|
+
|
|
276
|
+
# Should be GCS
|
|
277
|
+
\sgcs\s
|
|
278
|
+
|
|
279
|
+
# Should be Dataflow ML
|
|
280
|
+
\b[Dd]ataflowML\b
|
|
281
|
+
|
|
282
|
+
# Should be API
|
|
283
|
+
\s(?!API)(?!.*[\(\)\{\},=#]+)[Aa][Pp][Ii]\s
|
|
284
|
+
|
|
285
|
+
# Should be arXiv
|
|
286
|
+
\bAr[Xx]iv\b
|
|
287
|
+
|
|
288
|
+
# Should be DeepEval
|
|
289
|
+
\b(?!DeepEval\b)(?!deepeval\b)[Dd]eep\s?[Ee]val\b
|
|
290
|
+
|
|
291
|
+
# Invalid Space Character
|
|
292
|
+
\w \w
|
|
293
|
+
|
|
294
|
+
# Don't use "smart quotes"
|
|
295
|
+
(?!'")[‘’“”]
|
|
296
|
+
|
|
297
|
+
# "an" should only be before vowels.
|
|
298
|
+
\ban\s+(?![FHLMNRSX][A-Z0-9]+\b)(?!hour\b)(?!honest\b)([b-df-hj-np-tv-zB-DF-HJ-NP-TV-Z]{1}\w*)
|
|
299
|
+
|
|
300
|
+
# Don't use Google internal links
|
|
301
|
+
((corp|prod|sandbox).google.com|googleplex.com|https?://(?!localhost/)[0-9a-z][0-9a-z-]+/|(?:^|[^/.-])\b(?:go|b|cl|cr)/[a-z0-9_.-]+\b)
|
|
302
|
+
|
|
303
|
+
# Use `%pip` instead of `!pip` or `!pip3`
|
|
304
|
+
!\s?pip3?
|
|
305
|
+
|
|
306
|
+
# Don't use embedded images, upload to Google Cloud Storage
|
|
307
|
+
\(data:image/(?:jpeg|png);base64,[^{]
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#################################
|
|
2
|
+
#################################
|
|
3
|
+
## Super Linter GitHub Actions ##
|
|
4
|
+
#################################
|
|
5
|
+
#################################
|
|
6
|
+
name: Lint Code Base
|
|
7
|
+
|
|
8
|
+
#
|
|
9
|
+
# Documentation:
|
|
10
|
+
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
|
|
11
|
+
#
|
|
12
|
+
|
|
13
|
+
#############################
|
|
14
|
+
# Start the job on all push #
|
|
15
|
+
#############################
|
|
16
|
+
on:
|
|
17
|
+
pull_request:
|
|
18
|
+
branches: [main]
|
|
19
|
+
|
|
20
|
+
###############
|
|
21
|
+
# Set the Job #
|
|
22
|
+
###############
|
|
23
|
+
jobs:
|
|
24
|
+
build:
|
|
25
|
+
# Name the Job
|
|
26
|
+
name: Lint Code Base
|
|
27
|
+
# Set the agent to run on
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
# if on repo to avoid failing runs on forks
|
|
30
|
+
if: |
|
|
31
|
+
github.repository == 'google/a2a-python'
|
|
32
|
+
|
|
33
|
+
##################
|
|
34
|
+
# Load all steps #
|
|
35
|
+
##################
|
|
36
|
+
steps:
|
|
37
|
+
##########################
|
|
38
|
+
# Checkout the code base #
|
|
39
|
+
##########################
|
|
40
|
+
- name: Checkout Code
|
|
41
|
+
uses: actions/checkout@v4
|
|
42
|
+
with:
|
|
43
|
+
# Full git history is needed to get a proper list of changed files within `super-linter`
|
|
44
|
+
fetch-depth: 0
|
|
45
|
+
|
|
46
|
+
################################
|
|
47
|
+
# Run Linter against code base #
|
|
48
|
+
################################
|
|
49
|
+
- name: Lint Code Base
|
|
50
|
+
uses: super-linter/super-linter/slim@v7
|
|
51
|
+
env:
|
|
52
|
+
DEFAULT_BRANCH: main
|
|
53
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
54
|
+
LOG_LEVEL: WARN
|
|
55
|
+
SHELLCHECK_OPTS: -e SC1091 -e 2086
|
|
56
|
+
VALIDATE_PYTHON_BLACK: false
|
|
57
|
+
VALIDATE_PYTHON_FLAKE8: false
|
|
58
|
+
VALIDATE_PYTHON_ISORT: false
|
|
59
|
+
VALIDATE_PYTHON_PYLINT: false
|
|
60
|
+
VALIDATE_PYTHON_PYINK: false
|
|
61
|
+
VALIDATE_CHECKOV: false
|
|
62
|
+
VALIDATE_JAVASCRIPT_STANDARD: false
|
|
63
|
+
VALIDATE_TYPESCRIPT_STANDARD: false
|
|
64
|
+
VALIDATE_GIT_COMMITLINT: false
|
|
65
|
+
MARKDOWN_CONFIG_FILE: .markdownlint.json
|