opencode-a2a 0.3.1__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 (102) hide show
  1. opencode_a2a-0.3.1/.github/workflows/ci.yml +82 -0
  2. opencode_a2a-0.3.1/.github/workflows/dependency-health.yml +31 -0
  3. opencode_a2a-0.3.1/.github/workflows/publish.yml +85 -0
  4. opencode_a2a-0.3.1/.gitignore +226 -0
  5. opencode_a2a-0.3.1/.pre-commit-config.yaml +37 -0
  6. opencode_a2a-0.3.1/.secrets.baseline +131 -0
  7. opencode_a2a-0.3.1/AGENTS.md +51 -0
  8. opencode_a2a-0.3.1/CONTRIBUTING.md +103 -0
  9. opencode_a2a-0.3.1/LICENSE +176 -0
  10. opencode_a2a-0.3.1/PKG-INFO +173 -0
  11. opencode_a2a-0.3.1/README.md +135 -0
  12. opencode_a2a-0.3.1/SECURITY.md +58 -0
  13. opencode_a2a-0.3.1/docs/guide.md +872 -0
  14. opencode_a2a-0.3.1/pyproject.toml +83 -0
  15. opencode_a2a-0.3.1/scripts/README.md +23 -0
  16. opencode_a2a-0.3.1/scripts/check_coverage.py +73 -0
  17. opencode_a2a-0.3.1/scripts/dependency_health.sh +13 -0
  18. opencode_a2a-0.3.1/scripts/doctor.sh +16 -0
  19. opencode_a2a-0.3.1/scripts/health_common.sh +23 -0
  20. opencode_a2a-0.3.1/scripts/lint.sh +22 -0
  21. opencode_a2a-0.3.1/scripts/smoke_test_built_cli.sh +108 -0
  22. opencode_a2a-0.3.1/setup.cfg +4 -0
  23. opencode_a2a-0.3.1/src/opencode_a2a/__init__.py +15 -0
  24. opencode_a2a-0.3.1/src/opencode_a2a/cli.py +52 -0
  25. opencode_a2a-0.3.1/src/opencode_a2a/config.py +160 -0
  26. opencode_a2a-0.3.1/src/opencode_a2a/contracts/__init__.py +1 -0
  27. opencode_a2a-0.3.1/src/opencode_a2a/contracts/extensions.py +948 -0
  28. opencode_a2a-0.3.1/src/opencode_a2a/execution/__init__.py +1 -0
  29. opencode_a2a-0.3.1/src/opencode_a2a/execution/executor.py +1582 -0
  30. opencode_a2a-0.3.1/src/opencode_a2a/execution/request_context.py +91 -0
  31. opencode_a2a-0.3.1/src/opencode_a2a/execution/stream_events.py +578 -0
  32. opencode_a2a-0.3.1/src/opencode_a2a/execution/stream_state.py +279 -0
  33. opencode_a2a-0.3.1/src/opencode_a2a/execution/upstream_errors.py +264 -0
  34. opencode_a2a-0.3.1/src/opencode_a2a/jsonrpc/__init__.py +1 -0
  35. opencode_a2a-0.3.1/src/opencode_a2a/jsonrpc/application.py +1036 -0
  36. opencode_a2a-0.3.1/src/opencode_a2a/jsonrpc/methods.py +537 -0
  37. opencode_a2a-0.3.1/src/opencode_a2a/jsonrpc/params.py +123 -0
  38. opencode_a2a-0.3.1/src/opencode_a2a/opencode_upstream_client.py +544 -0
  39. opencode_a2a-0.3.1/src/opencode_a2a/parts/__init__.py +1 -0
  40. opencode_a2a-0.3.1/src/opencode_a2a/parts/mapping.py +151 -0
  41. opencode_a2a-0.3.1/src/opencode_a2a/parts/text.py +24 -0
  42. opencode_a2a-0.3.1/src/opencode_a2a/profile/__init__.py +1 -0
  43. opencode_a2a-0.3.1/src/opencode_a2a/profile/runtime.py +254 -0
  44. opencode_a2a-0.3.1/src/opencode_a2a/server/__init__.py +1 -0
  45. opencode_a2a-0.3.1/src/opencode_a2a/server/agent_card.py +288 -0
  46. opencode_a2a-0.3.1/src/opencode_a2a/server/application.py +634 -0
  47. opencode_a2a-0.3.1/src/opencode_a2a/server/openapi.py +432 -0
  48. opencode_a2a-0.3.1/src/opencode_a2a/server/request_parsing.py +109 -0
  49. opencode_a2a-0.3.1/src/opencode_a2a.egg-info/PKG-INFO +173 -0
  50. opencode_a2a-0.3.1/src/opencode_a2a.egg-info/SOURCES.txt +100 -0
  51. opencode_a2a-0.3.1/src/opencode_a2a.egg-info/dependency_links.txt +1 -0
  52. opencode_a2a-0.3.1/src/opencode_a2a.egg-info/entry_points.txt +2 -0
  53. opencode_a2a-0.3.1/src/opencode_a2a.egg-info/requires.txt +16 -0
  54. opencode_a2a-0.3.1/src/opencode_a2a.egg-info/top_level.txt +1 -0
  55. opencode_a2a-0.3.1/tests/__init__.py +1 -0
  56. opencode_a2a-0.3.1/tests/config/__init__.py +1 -0
  57. opencode_a2a-0.3.1/tests/config/test_settings.py +84 -0
  58. opencode_a2a-0.3.1/tests/contracts/__init__.py +1 -0
  59. opencode_a2a-0.3.1/tests/contracts/test_extension_contract_consistency.py +320 -0
  60. opencode_a2a-0.3.1/tests/execution/__init__.py +1 -0
  61. opencode_a2a-0.3.1/tests/execution/test_agent_errors.py +516 -0
  62. opencode_a2a-0.3.1/tests/execution/test_agent_helpers.py +401 -0
  63. opencode_a2a-0.3.1/tests/execution/test_cancellation.py +295 -0
  64. opencode_a2a-0.3.1/tests/execution/test_directory_validation.py +97 -0
  65. opencode_a2a-0.3.1/tests/execution/test_metrics.py +205 -0
  66. opencode_a2a-0.3.1/tests/execution/test_multipart_input.py +170 -0
  67. opencode_a2a-0.3.1/tests/execution/test_opencode_agent_session_binding.py +208 -0
  68. opencode_a2a-0.3.1/tests/execution/test_session_ownership.py +322 -0
  69. opencode_a2a-0.3.1/tests/execution/test_streaming_output_contract_blocks.py +319 -0
  70. opencode_a2a-0.3.1/tests/execution/test_streaming_output_contract_core.py +790 -0
  71. opencode_a2a-0.3.1/tests/execution/test_streaming_output_contract_interrupts.py +280 -0
  72. opencode_a2a-0.3.1/tests/execution/test_streaming_output_contract_logging.py +183 -0
  73. opencode_a2a-0.3.1/tests/jsonrpc/__init__.py +1 -0
  74. opencode_a2a-0.3.1/tests/jsonrpc/test_jsonrpc_methods.py +254 -0
  75. opencode_a2a-0.3.1/tests/jsonrpc/test_jsonrpc_params.py +93 -0
  76. opencode_a2a-0.3.1/tests/jsonrpc/test_jsonrpc_unsupported_method.py +85 -0
  77. opencode_a2a-0.3.1/tests/jsonrpc/test_opencode_session_extension_commands.py +483 -0
  78. opencode_a2a-0.3.1/tests/jsonrpc/test_opencode_session_extension_interrupts.py +454 -0
  79. opencode_a2a-0.3.1/tests/jsonrpc/test_opencode_session_extension_prompt_async.py +517 -0
  80. opencode_a2a-0.3.1/tests/jsonrpc/test_opencode_session_extension_queries.py +796 -0
  81. opencode_a2a-0.3.1/tests/package/__init__.py +1 -0
  82. opencode_a2a-0.3.1/tests/package/test_version.py +12 -0
  83. opencode_a2a-0.3.1/tests/parts/__init__.py +1 -0
  84. opencode_a2a-0.3.1/tests/parts/test_parts_text.py +55 -0
  85. opencode_a2a-0.3.1/tests/profile/__init__.py +1 -0
  86. opencode_a2a-0.3.1/tests/profile/test_profile_runtime.py +117 -0
  87. opencode_a2a-0.3.1/tests/scripts/__init__.py +1 -0
  88. opencode_a2a-0.3.1/tests/scripts/test_script_health_contract.py +68 -0
  89. opencode_a2a-0.3.1/tests/server/__init__.py +1 -0
  90. opencode_a2a-0.3.1/tests/server/test_agent_card.py +392 -0
  91. opencode_a2a-0.3.1/tests/server/test_app_behaviors.py +628 -0
  92. opencode_a2a-0.3.1/tests/server/test_call_context_builder.py +44 -0
  93. opencode_a2a-0.3.1/tests/server/test_cancel_contract.py +169 -0
  94. opencode_a2a-0.3.1/tests/server/test_cli.py +58 -0
  95. opencode_a2a-0.3.1/tests/server/test_transport_contract.py +569 -0
  96. opencode_a2a-0.3.1/tests/support/__init__.py +1 -0
  97. opencode_a2a-0.3.1/tests/support/helpers.py +392 -0
  98. opencode_a2a-0.3.1/tests/support/session_extensions.py +10 -0
  99. opencode_a2a-0.3.1/tests/support/streaming_output.py +279 -0
  100. opencode_a2a-0.3.1/tests/upstream/__init__.py +1 -0
  101. opencode_a2a-0.3.1/tests/upstream/test_opencode_upstream_client_params.py +861 -0
  102. opencode_a2a-0.3.1/uv.lock +1376 -0
@@ -0,0 +1,82 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ quality-gate:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.13"
24
+
25
+ - name: Setup uv
26
+ uses: astral-sh/setup-uv@v4
27
+ with:
28
+ enable-cache: true
29
+
30
+ - name: Sync Dependencies
31
+ run: uv sync --all-extras --frozen
32
+
33
+ - name: Run pre-commit
34
+ run: bash ./scripts/lint.sh
35
+
36
+ - name: Run pytest
37
+ run: uv run pytest
38
+
39
+ - name: Enforce coverage policy
40
+ run: uv run python ./scripts/check_coverage.py
41
+
42
+ - name: Run dependency vulnerability audit
43
+ run: uv run pip-audit
44
+
45
+ - name: Clean previous build artifacts
46
+ run: rm -rf build dist
47
+
48
+ - name: Build package artifacts
49
+ run: uv build --no-sources
50
+
51
+ - name: Smoke test built wheel
52
+ run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a-*.whl
53
+
54
+ - name: Smoke test built sdist
55
+ run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a-*.tar.gz
56
+
57
+ runtime-matrix:
58
+ runs-on: ubuntu-latest
59
+ strategy:
60
+ fail-fast: false
61
+ matrix:
62
+ python-version: ["3.11", "3.12"]
63
+
64
+ steps:
65
+ - name: Checkout
66
+ uses: actions/checkout@v4
67
+
68
+ - name: Setup Python
69
+ uses: actions/setup-python@v5
70
+ with:
71
+ python-version: ${{ matrix.python-version }}
72
+
73
+ - name: Setup uv
74
+ uses: astral-sh/setup-uv@v4
75
+ with:
76
+ enable-cache: true
77
+
78
+ - name: Sync Dependencies
79
+ run: uv sync --all-extras --frozen
80
+
81
+ - name: Run pytest runtime matrix
82
+ run: uv run pytest --no-cov
@@ -0,0 +1,31 @@
1
+ name: Dependency Health
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ schedule:
6
+ # 03:00 UTC on day-of-month 1
7
+ - cron: "0 3 1 * *"
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ dependency-health:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.13"
24
+
25
+ - name: Setup uv
26
+ uses: astral-sh/setup-uv@v4
27
+ with:
28
+ enable-cache: true
29
+
30
+ - name: Run dependency health checks
31
+ run: bash ./scripts/dependency_health.sh
@@ -0,0 +1,85 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+ id-token: write
12
+
13
+ jobs:
14
+ publish:
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Setup Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.13"
27
+
28
+ - name: Setup uv
29
+ uses: astral-sh/setup-uv@v4
30
+ with:
31
+ enable-cache: true
32
+
33
+ - name: Run regression baseline
34
+ run: bash ./scripts/doctor.sh
35
+
36
+ - name: Run dependency vulnerability audit
37
+ run: uv run pip-audit
38
+
39
+ - name: Clean previous build artifacts
40
+ run: rm -rf build dist
41
+
42
+ - name: Build package artifacts
43
+ run: uv build --no-sources
44
+
45
+ - name: Verify published version matches tag
46
+ run: |
47
+ python - <<'PY'
48
+ import os
49
+ import pathlib
50
+
51
+ dist_dir = pathlib.Path("dist")
52
+ wheels = sorted(dist_dir.glob("opencode_a2a-*.whl"))
53
+ sdists = sorted(dist_dir.glob("opencode_a2a-*.tar.gz"))
54
+ if len(wheels) != 1:
55
+ raise SystemExit(f"Expected exactly one wheel in dist/, found {len(wheels)}")
56
+ if len(sdists) != 1:
57
+ raise SystemExit(f"Expected exactly one sdist in dist/, found {len(sdists)}")
58
+ wheel = wheels[0].name
59
+ sdist = sdists[0].name
60
+ version = wheel.removeprefix("opencode_a2a-").split("-py3", 1)[0]
61
+ sdist_version = sdist.removeprefix("opencode_a2a-").removesuffix(".tar.gz")
62
+ tag = os.environ["GITHUB_REF_NAME"].removeprefix("v")
63
+ if version != tag:
64
+ raise SystemExit(f"Wheel version {version!r} does not match tag {tag!r}")
65
+ if sdist_version != tag:
66
+ raise SystemExit(f"sdist version {sdist_version!r} does not match tag {tag!r}")
67
+ print(f"Validated release version: {version}")
68
+ PY
69
+
70
+ - name: Smoke test wheel install
71
+ run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a-*.whl
72
+
73
+ - name: Smoke test sdist install
74
+ run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a-*.tar.gz
75
+
76
+ - name: Publish to PyPI
77
+ uses: pypa/gh-action-pypi-publish@release/v1
78
+
79
+ - name: Create GitHub Release
80
+ uses: softprops/action-gh-release@v2
81
+ with:
82
+ generate_release_notes: true
83
+ files: |
84
+ dist/*.tar.gz
85
+ dist/*.whl
@@ -0,0 +1,226 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ !src/opencode_a2a_server/parts/
21
+ !src/opencode_a2a_server/parts/*.py
22
+ !tests/parts/
23
+ !tests/parts/*.py
24
+ src/opencode_a2a_server/parts/__pycache__/
25
+ sdist/
26
+ var/
27
+ wheels/
28
+ share/python-wheels/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ *.egg
32
+ MANIFEST
33
+
34
+ # PyInstaller
35
+ # Usually these files are written by a python script from a template
36
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
37
+ *.manifest
38
+ *.spec
39
+
40
+ # Installer logs
41
+ pip-log.txt
42
+ pip-delete-this-directory.txt
43
+
44
+ # Local logs
45
+ logs/
46
+ run/
47
+
48
+ # Unit test / coverage reports
49
+ htmlcov/
50
+ .tox/
51
+ .nox/
52
+ .coverage
53
+ .coverage.*
54
+ .cache
55
+ nosetests.xml
56
+ coverage.xml
57
+ *.cover
58
+ *.py.cover
59
+ .hypothesis/
60
+ .pytest_cache/
61
+ cover/
62
+
63
+ # Translations
64
+ *.mo
65
+ *.pot
66
+
67
+ # Django stuff:
68
+ *.log
69
+ local_settings.py
70
+ db.sqlite3
71
+ db.sqlite3-journal
72
+
73
+ # Flask stuff:
74
+ instance/
75
+ .webassets-cache
76
+
77
+ # Scrapy stuff:
78
+ .scrapy
79
+
80
+ # Sphinx documentation
81
+ docs/_build/
82
+
83
+ # PyBuilder
84
+ .pybuilder/
85
+ target/
86
+
87
+ # Jupyter Notebook
88
+ .ipynb_checkpoints
89
+
90
+ # IPython
91
+ profile_default/
92
+ ipython_config.py
93
+
94
+ # pyenv
95
+ # For a library or package, you might want to ignore these files since the code is
96
+ # intended to run in multiple environments; otherwise, check them in:
97
+ # .python-version
98
+
99
+ # pipenv
100
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
101
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
102
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
103
+ # install all needed dependencies.
104
+ #Pipfile.lock
105
+
106
+ # UV
107
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ #uv.lock
111
+
112
+ # poetry
113
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
114
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
115
+ # commonly ignored for libraries.
116
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
117
+ #poetry.lock
118
+ #poetry.toml
119
+
120
+ # pdm
121
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
122
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
123
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
124
+ #pdm.lock
125
+ #pdm.toml
126
+ .pdm-python
127
+ .pdm-build/
128
+
129
+ # pixi
130
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
131
+ #pixi.lock
132
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
133
+ # in the .venv directory. It is recommended not to include this directory in version control.
134
+ .pixi
135
+
136
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
137
+ __pypackages__/
138
+
139
+ # Celery stuff
140
+ celerybeat-schedule
141
+ celerybeat.pid
142
+
143
+ # SageMath parsed files
144
+ *.sage.py
145
+
146
+ # Environments
147
+ .env
148
+ .envrc
149
+ .venv
150
+ env/
151
+ venv/
152
+ ENV/
153
+ env.bak/
154
+ venv.bak/
155
+
156
+ # Spyder project settings
157
+ .spyderproject
158
+ .spyproject
159
+
160
+ # Rope project settings
161
+ .ropeproject
162
+
163
+ # mkdocs documentation
164
+ /site
165
+
166
+ # mypy
167
+ .mypy_cache/
168
+ .dmypy.json
169
+ dmypy.json
170
+
171
+ # Pyre type checker
172
+ .pyre/
173
+
174
+ # pytype static type analyzer
175
+ .pytype/
176
+
177
+ # Cython debug symbols
178
+ cython_debug/
179
+
180
+ # PyCharm
181
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
182
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
183
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
184
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
185
+ #.idea/
186
+
187
+ # Abstra
188
+ # Abstra is an AI-powered process automation framework.
189
+ # Ignore directories containing user credentials, local state, and settings.
190
+ # Learn more at https://abstra.io/docs
191
+ .abstra/
192
+
193
+ # Visual Studio Code
194
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
195
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
196
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
197
+ # you could uncomment the following to ignore the entire vscode folder
198
+ # .vscode/
199
+
200
+ # Ruff stuff:
201
+ .ruff_cache/
202
+
203
+ # PyPI configuration file
204
+ .pypirc
205
+
206
+ # Cursor
207
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
208
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
209
+ # refer to https://docs.cursor.com/context/ignore-files
210
+ .cursorignore
211
+ .cursorindexingignore
212
+
213
+ # Marimo
214
+ marimo/_static/
215
+ marimo/_lsp/
216
+ __marimo__/
217
+
218
+ # GitHub CLI temporary body files (should not be committed)
219
+ issue_*.md
220
+
221
+ # Local session temp files
222
+ temp_*.*
223
+
224
+ # Local OpenCode OpenAPI snapshots (high-churn, local reference only)
225
+ docs/operations/opencode/
226
+ .swival/
@@ -0,0 +1,37 @@
1
+ minimum_pre_commit_version: 4.5.1
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v4.6.0
5
+ hooks:
6
+ - id: trailing-whitespace
7
+ - id: end-of-file-fixer
8
+ - id: check-yaml
9
+ - repo: https://github.com/shellcheck-py/shellcheck-py
10
+ rev: v0.11.0.1
11
+ hooks:
12
+ - id: shellcheck
13
+ args: ["--severity=error"]
14
+ files: ^scripts/.*\.sh$
15
+ - repo: https://github.com/astral-sh/ruff-pre-commit
16
+ rev: v0.14.14
17
+ hooks:
18
+ - id: ruff
19
+ args: ["--fix"]
20
+ - id: ruff-format
21
+ - repo: https://github.com/Yelp/detect-secrets
22
+ rev: v1.5.0
23
+ hooks:
24
+ - id: detect-secrets
25
+ args: ["--baseline", ".secrets.baseline"]
26
+ - repo: local
27
+ hooks:
28
+ - id: mypy
29
+ name: mypy
30
+ entry: uv run mypy src/opencode_a2a
31
+ language: system
32
+ pass_filenames: false
33
+ - id: bash-n
34
+ name: bash syntax check
35
+ entry: bash -n
36
+ language: system
37
+ files: ^scripts/.*\.sh$
@@ -0,0 +1,131 @@
1
+ {
2
+ "version": "1.5.0",
3
+ "plugins_used": [
4
+ {
5
+ "name": "ArtifactoryDetector"
6
+ },
7
+ {
8
+ "name": "AWSKeyDetector"
9
+ },
10
+ {
11
+ "name": "AzureStorageKeyDetector"
12
+ },
13
+ {
14
+ "name": "Base64HighEntropyString",
15
+ "limit": 4.5
16
+ },
17
+ {
18
+ "name": "BasicAuthDetector"
19
+ },
20
+ {
21
+ "name": "CloudantDetector"
22
+ },
23
+ {
24
+ "name": "DiscordBotTokenDetector"
25
+ },
26
+ {
27
+ "name": "GitHubTokenDetector"
28
+ },
29
+ {
30
+ "name": "GitLabTokenDetector"
31
+ },
32
+ {
33
+ "name": "HexHighEntropyString",
34
+ "limit": 3.0
35
+ },
36
+ {
37
+ "name": "IbmCloudIamDetector"
38
+ },
39
+ {
40
+ "name": "IbmCosHmacDetector"
41
+ },
42
+ {
43
+ "name": "IPPublicDetector"
44
+ },
45
+ {
46
+ "name": "JwtTokenDetector"
47
+ },
48
+ {
49
+ "name": "KeywordDetector",
50
+ "keyword_exclude": ""
51
+ },
52
+ {
53
+ "name": "MailchimpDetector"
54
+ },
55
+ {
56
+ "name": "NpmDetector"
57
+ },
58
+ {
59
+ "name": "OpenAIDetector"
60
+ },
61
+ {
62
+ "name": "PrivateKeyDetector"
63
+ },
64
+ {
65
+ "name": "PypiTokenDetector"
66
+ },
67
+ {
68
+ "name": "SendGridDetector"
69
+ },
70
+ {
71
+ "name": "SlackDetector"
72
+ },
73
+ {
74
+ "name": "SoftlayerDetector"
75
+ },
76
+ {
77
+ "name": "SquareOAuthDetector"
78
+ },
79
+ {
80
+ "name": "StripeDetector"
81
+ },
82
+ {
83
+ "name": "TelegramBotTokenDetector"
84
+ },
85
+ {
86
+ "name": "TwilioKeyDetector"
87
+ }
88
+ ],
89
+ "filters_used": [
90
+ {
91
+ "path": "detect_secrets.filters.allowlist.is_line_allowlisted"
92
+ },
93
+ {
94
+ "path": "detect_secrets.filters.common.is_baseline_file",
95
+ "filename": ".secrets.baseline"
96
+ },
97
+ {
98
+ "path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
99
+ "min_level": 2
100
+ },
101
+ {
102
+ "path": "detect_secrets.filters.heuristic.is_indirect_reference"
103
+ },
104
+ {
105
+ "path": "detect_secrets.filters.heuristic.is_likely_id_string"
106
+ },
107
+ {
108
+ "path": "detect_secrets.filters.heuristic.is_lock_file"
109
+ },
110
+ {
111
+ "path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
112
+ },
113
+ {
114
+ "path": "detect_secrets.filters.heuristic.is_potential_uuid"
115
+ },
116
+ {
117
+ "path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
118
+ },
119
+ {
120
+ "path": "detect_secrets.filters.heuristic.is_sequential_string"
121
+ },
122
+ {
123
+ "path": "detect_secrets.filters.heuristic.is_swagger_file"
124
+ },
125
+ {
126
+ "path": "detect_secrets.filters.heuristic.is_templated_secret"
127
+ }
128
+ ],
129
+ "results": {},
130
+ "generated_at": "2026-03-19T03:57:43Z"
131
+ }
@@ -0,0 +1,51 @@
1
+ # AGENTS.md
2
+
3
+ The following rules apply to coding agent collaboration and delivery workflows in this repository.
4
+
5
+ ## 1. Core Principles
6
+
7
+ - Move tasks forward under secure and traceable conditions, while avoiding unnecessary process blockers.
8
+ - Stay consistent with the existing repository structure, implementation style, and engineering conventions.
9
+
10
+ ## 2. Git Workflow
11
+
12
+ - Do not commit or push directly to protected branches: `main` / `master` / `release/*`.
13
+ - Each development task should be implemented on an independent branch, preferably cut from the latest mainline.
14
+ - Prefer `git fetch` + `git merge --ff-only` to sync mainline and avoid implicit merges.
15
+ - It is allowed to push development branches to remote branches with the same name for collaboration and backup.
16
+ - Do not rewrite shared history: no `git push --force`, `git push --force-with-lease`, or arbitrary `rebase`.
17
+ - Commit only files related to the current task; do not clean up or roll back unrelated local changes.
18
+
19
+ ## 3. Issue and PR Collaboration
20
+
21
+ - Before starting a development task, check whether a related open issue already exists (for example, `gh issue list --state open`).
22
+ - If no related issue exists, create a new issue for tracking. The issue should include background, reproduction steps, expected vs. actual behavior, acceptance criteria, and a `git rev-parse HEAD` snapshot.
23
+ - Only collaboration-process documentation changes (such as `AGENTS.md`) can be modified directly without creating an additional issue.
24
+ - Recommended issue title prefixes: `[feat]`, `[bug]`, `[docs]`, `[ops]`, `[chore]`.
25
+ - If a commit serves a specific issue, include the corresponding `#issue` in the commit message.
26
+ - PRs are recommended to be created as Draft by default, and should explicitly indicate linkage in the description (for example, `Closes #xx` / `Relates to #xx`).
27
+ - When key progress, solution changes, or new risks appear, sync updates to the corresponding issue/PR in time and avoid duplicate comments.
28
+
29
+ ## 4. Tooling and Text Conventions
30
+
31
+ - Use `gh` CLI to read and write issues/PRs; do not edit through the web UI manually.
32
+ - Use Simplified Chinese for issues, PRs, and comments; technical terms may remain in English.
33
+ - For multi-line bodies, write to a temporary file first and pass it with `--body-file`; do not concatenate `\\n` in `--body`.
34
+ - Use `#123` for same-repo references (auto-linking); use full URLs for cross-repo references.
35
+
36
+ ## 5. Regression and Validation
37
+
38
+ - Choose regression strategy based on change type. Default baseline:
39
+ - `uv run pre-commit run --all-files`
40
+ - `uv run pytest`
41
+ - If `pre-commit` auto-fixes files (such as `ruff --fix`), review the changes before committing.
42
+ - For shell/deployment script changes, in addition to baseline checks, run at least `bash -n` for syntax validation on modified scripts.
43
+ - For documentation-only changes, tests may be skipped, but commands and path examples must be self-checked for usability.
44
+ - `uv sync --all-extras` is required only for first-time setup or dependency changes; it is not mandatory for every change.
45
+ - If any validation cannot be completed due to environment limits, explicitly state the skipped item and reason in the report.
46
+
47
+ ## 6. Security and Configuration
48
+
49
+ - Never commit keys, tokens, credentials, or other sensitive information (including `.env` content).
50
+ - Logs and debug output must not leak access tokens or private data.
51
+ - Changes related to deployment, authentication, or secret injection must include synchronized documentation updates and minimal acceptance steps.