agentseam 0.1.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.
- agentseam-0.1.0/LICENSE +202 -0
- agentseam-0.1.0/PKG-INFO +295 -0
- agentseam-0.1.0/README.md +265 -0
- agentseam-0.1.0/pyproject.toml +70 -0
- agentseam-0.1.0/setup.cfg +4 -0
- agentseam-0.1.0/src/agentseam/__init__.py +83 -0
- agentseam-0.1.0/src/agentseam/adapters/__init__.py +69 -0
- agentseam-0.1.0/src/agentseam/adapters/_windows.py +32 -0
- agentseam-0.1.0/src/agentseam/adapters/antigravity.py +189 -0
- agentseam-0.1.0/src/agentseam/adapters/claude_code.py +299 -0
- agentseam-0.1.0/src/agentseam/adapters/codex_cli.py +261 -0
- agentseam-0.1.0/src/agentseam/adapters/cursor.py +300 -0
- agentseam-0.1.0/src/agentseam/adapters/devin.py +213 -0
- agentseam-0.1.0/src/agentseam/adapters/gemini_cli.py +202 -0
- agentseam-0.1.0/src/agentseam/adapters/grok.py +175 -0
- agentseam-0.1.0/src/agentseam/adapters/junie.py +182 -0
- agentseam-0.1.0/src/agentseam/adapters/kimi_code.py +225 -0
- agentseam-0.1.0/src/agentseam/adapters/tabnine.py +169 -0
- agentseam-0.1.0/src/agentseam/adapters/vscode_copilot.py +300 -0
- agentseam-0.1.0/src/agentseam/adapters/windsurf.py +163 -0
- agentseam-0.1.0/src/agentseam/allow_semantics.py +146 -0
- agentseam-0.1.0/src/agentseam/bundler.py +197 -0
- agentseam-0.1.0/src/agentseam/bundler_templates.py +120 -0
- agentseam-0.1.0/src/agentseam/cli.py +283 -0
- agentseam-0.1.0/src/agentseam/contract.py +216 -0
- agentseam-0.1.0/src/agentseam/dispatch.py +150 -0
- agentseam-0.1.0/src/agentseam/install.py +81 -0
- agentseam-0.1.0/src/agentseam/install_config.py +214 -0
- agentseam-0.1.0/src/agentseam/install_identity.py +133 -0
- agentseam-0.1.0/src/agentseam/instructions.py +203 -0
- agentseam-0.1.0/src/agentseam/matrix.py +118 -0
- agentseam-0.1.0/src/agentseam/matrix_data.py +258 -0
- agentseam-0.1.0/src/agentseam/matrix_evidence.py +227 -0
- agentseam-0.1.0/src/agentseam/matrix_gaps.py +64 -0
- agentseam-0.1.0/src/agentseam/matrix_notes.py +64 -0
- agentseam-0.1.0/src/agentseam/matrix_terms.py +55 -0
- agentseam-0.1.0/src/agentseam/packaging.py +299 -0
- agentseam-0.1.0/src/agentseam/packaging_data.py +278 -0
- agentseam-0.1.0/src/agentseam/packaging_limits.py +80 -0
- agentseam-0.1.0/src/agentseam/permissions.py +234 -0
- agentseam-0.1.0/src/agentseam/permissions_data.py +234 -0
- agentseam-0.1.0/src/agentseam/permissions_render.py +196 -0
- agentseam-0.1.0/src/agentseam.egg-info/PKG-INFO +295 -0
- agentseam-0.1.0/src/agentseam.egg-info/SOURCES.txt +83 -0
- agentseam-0.1.0/src/agentseam.egg-info/dependency_links.txt +1 -0
- agentseam-0.1.0/src/agentseam.egg-info/entry_points.txt +2 -0
- agentseam-0.1.0/src/agentseam.egg-info/requires.txt +3 -0
- agentseam-0.1.0/src/agentseam.egg-info/top_level.txt +1 -0
- agentseam-0.1.0/tests/test_adapter_antigravity.py +125 -0
- agentseam-0.1.0/tests/test_adapter_claude_code.py +248 -0
- agentseam-0.1.0/tests/test_adapter_codex_cli.py +175 -0
- agentseam-0.1.0/tests/test_adapter_cursor.py +164 -0
- agentseam-0.1.0/tests/test_adapter_devin.py +109 -0
- agentseam-0.1.0/tests/test_adapter_gemini_cli.py +83 -0
- agentseam-0.1.0/tests/test_adapter_grok.py +76 -0
- agentseam-0.1.0/tests/test_adapter_junie.py +137 -0
- agentseam-0.1.0/tests/test_adapter_kimi_code.py +141 -0
- agentseam-0.1.0/tests/test_adapter_tabnine.py +117 -0
- agentseam-0.1.0/tests/test_adapter_vscode_copilot.py +150 -0
- agentseam-0.1.0/tests/test_adapter_windsurf.py +98 -0
- agentseam-0.1.0/tests/test_allow_is_vendor_default.py +199 -0
- agentseam-0.1.0/tests/test_bundler.py +105 -0
- agentseam-0.1.0/tests/test_bundler_subprocess.py +144 -0
- agentseam-0.1.0/tests/test_capture_kit.py +262 -0
- agentseam-0.1.0/tests/test_capture_probe.py +269 -0
- agentseam-0.1.0/tests/test_cli.py +136 -0
- agentseam-0.1.0/tests/test_decision_vocabulary.py +202 -0
- agentseam-0.1.0/tests/test_dispatch.py +246 -0
- agentseam-0.1.0/tests/test_examples.py +182 -0
- agentseam-0.1.0/tests/test_fail_closed_gates_are_answered.py +107 -0
- agentseam-0.1.0/tests/test_git_hooks.py +112 -0
- agentseam-0.1.0/tests/test_install.py +275 -0
- agentseam-0.1.0/tests/test_install_identity.py +107 -0
- agentseam-0.1.0/tests/test_instructions.py +129 -0
- agentseam-0.1.0/tests/test_matrix.py +300 -0
- agentseam-0.1.0/tests/test_no_private_data.py +74 -0
- agentseam-0.1.0/tests/test_packaging.py +206 -0
- agentseam-0.1.0/tests/test_packaging_copilot.py +95 -0
- agentseam-0.1.0/tests/test_packaging_executable.py +85 -0
- agentseam-0.1.0/tests/test_parse_is_total.py +107 -0
- agentseam-0.1.0/tests/test_permissions.py +229 -0
- agentseam-0.1.0/tests/test_redaction.py +150 -0
- agentseam-0.1.0/tests/test_repo_standards.py +98 -0
- agentseam-0.1.0/tests/test_unknown_events.py +95 -0
- agentseam-0.1.0/tests/test_vendor_lookups.py +107 -0
agentseam-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 open-coder-ai
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
agentseam-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentseam
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: The primitives layer for every coding agent — one handler API over per-agent hooks, instruction files, plugin packaging, and config.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://github.com/open-coder-ai/agentseam
|
|
7
|
+
Project-URL: Source, https://github.com/open-coder-ai/agentseam
|
|
8
|
+
Project-URL: Documentation, https://github.com/open-coder-ai/agentseam/blob/main/ARCHITECTURE.md
|
|
9
|
+
Project-URL: Issues, https://github.com/open-coder-ai/agentseam/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/open-coder-ai/agentseam/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: ai-agents,hooks,claude-code,cursor,copilot,codex,gemini-cli,windsurf,pretooluse,agents-md,plugin-packaging,guardrails,observability
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
<img src="https://raw.githubusercontent.com/open-coder-ai/agentseam/main/docs/assets/logo.svg"
|
|
32
|
+
alt="agentseam logo: five unevenly spaced vendor lines converging through a stitched seam into five evenly spaced parallel lines"
|
|
33
|
+
width="104" align="right">
|
|
34
|
+
|
|
35
|
+
# agentseam
|
|
36
|
+
|
|
37
|
+
**The primitives layer for every coding agent — one handler API over per-agent hooks,
|
|
38
|
+
instruction files, plugin packaging, and config.**
|
|
39
|
+
|
|
40
|
+
Write one handler. Run it on every coding agent. Every agent — Claude Code, Cursor, VS Code
|
|
41
|
+
Copilot, Codex, Gemini CLI, Windsurf — invented its own hook system: different event names,
|
|
42
|
+
different payload shapes, different ways to say "no", different config files. So every tool
|
|
43
|
+
built on top gets written once per agent, or targets one agent and stops there.
|
|
44
|
+
|
|
45
|
+
agentseam is the layer underneath: one normalized event, one decision type, and an explicit
|
|
46
|
+
map of what each agent can *actually* do.
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from agentseam import run, Decision
|
|
50
|
+
|
|
51
|
+
def handler(event):
|
|
52
|
+
if event.event == "pre_tool" and "AKIA" in (event.content or ""):
|
|
53
|
+
return Decision.deny("no AWS keys in memory files")
|
|
54
|
+
return Decision.allow()
|
|
55
|
+
|
|
56
|
+
run(handler)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
agentseam install all "python3 my_handler.py" --events pre_tool
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
That handler now runs on Claude Code, Cursor, and VS Code Copilot — each getting its native
|
|
64
|
+
protocol, each wired into its own config file.
|
|
65
|
+
|
|
66
|
+
## It tells you the truth about what it can enforce
|
|
67
|
+
|
|
68
|
+
Agents are not equally capable, and pretending otherwise is how a "policy" silently fails.
|
|
69
|
+
The capability matrix is data, not marketing:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
$ agentseam matrix # trimmed to five of fifteen columns
|
|
73
|
+
aider claude_code cursor vscode_copilot zed
|
|
74
|
+
prompt_submit none enforced enforceable detect none
|
|
75
|
+
pre_tool none enforced enforceable enforced none
|
|
76
|
+
post_tool none detect detect detect none
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- **enforced** — the agent blocks, and fails closed if your hook dies
|
|
80
|
+
- **best-effort** — it blocks, but fails *open* (Cursor's default: a crashed hook allows)
|
|
81
|
+
- **detect** — you see it after the fact; prevention is not available (Cursor file edits
|
|
82
|
+
fire `afterFileEdit`, after the write already landed)
|
|
83
|
+
- **enforceable** — it blocks and *can* be told to fail closed, but doesn't by default
|
|
84
|
+
(Cursor's `failClosed: true`). "best-effort" would understate a surface you can make
|
|
85
|
+
airtight; "enforced" would claim a default that isn't there. agentseam's installer asks
|
|
86
|
+
for fail-closed on every gate it writes
|
|
87
|
+
- **none** — no hook surface at all (Zed, Aider). Said out loud rather than papered over.
|
|
88
|
+
|
|
89
|
+
A row is only claimed when a `verified: {version, date, method}` record backs it — the
|
|
90
|
+
version and date something was checked, and how (live run, vendor source, vendor docs).
|
|
91
|
+
No row asserts a capability nobody has verified.
|
|
92
|
+
|
|
93
|
+
`unadapted` is a fourth, deliberately separate state: agentseam has no hook adapter for
|
|
94
|
+
that agent yet. It is a claim about *us*, not about the agent — those agents still receive
|
|
95
|
+
instruction files, they just cannot have their tool calls gated here. Collapsing the two
|
|
96
|
+
would either slander an agent that does expose hooks or overstate our own coverage.
|
|
97
|
+
|
|
98
|
+
A `Decision.rewrite(...)` on an agent that cannot rewrite degrades to `ask`, never to a
|
|
99
|
+
silent pass-through. `agentseam doctor` reports what is wired on this machine and flags
|
|
100
|
+
capability rows that have not been re-verified in 90 days.
|
|
101
|
+
|
|
102
|
+
## What it is for
|
|
103
|
+
|
|
104
|
+
Not just guardrails. Anything that wants to watch or shape an agent's life:
|
|
105
|
+
|
|
106
|
+
| | |
|
|
107
|
+
|---|---|
|
|
108
|
+
| **Observability** | one JSONL/OTel stream across every agent in the repo (`examples/event_log.py`) |
|
|
109
|
+
| **Notifications** | desktop notification on stop or prompt (`examples/notify.py`) |
|
|
110
|
+
| **Cost tracking** | token/cost meters that work regardless of which agent ran |
|
|
111
|
+
| **Guardrails** | secrets, memory governance, destructive-command blocks |
|
|
112
|
+
| **Process gates** | TDD enforcement, "tests before push" |
|
|
113
|
+
| **Context injection** | inject memory/instructions at session start |
|
|
114
|
+
|
|
115
|
+
## One set of instructions, every agent
|
|
116
|
+
|
|
117
|
+
Multi-agent repos hand-maintain a drawer of near-identical files — CLAUDE.md, AGENTS.md,
|
|
118
|
+
`.cursor/rules/*`, `.github/copilot-instructions.md`, GEMINI.md, `.windsurfrules`,
|
|
119
|
+
`codex.md` — and they drift.
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
agentseam instructions --text "Prefer pnpm. Tests live beside source."
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
updated AGENTS.md
|
|
127
|
+
created CLAUDE.md
|
|
128
|
+
created .junie/guidelines.md
|
|
129
|
+
...
|
|
130
|
+
covered by AGENTS.md: codex_cli, copilot, cursor, gemini_cli, kimi_code, vscode_copilot, windsurf, zed
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
16 agents reached with 9 files written, because 8 of them read `AGENTS.md` natively and a
|
|
134
|
+
second copy would only drift. Content is written as a marker-delimited block, so anything a
|
|
135
|
+
human wrote in those files is preserved untouched — and `instructions --list` shows what
|
|
136
|
+
a repo is already telling its agents.
|
|
137
|
+
|
|
138
|
+
## One policy, four incompatible permission languages
|
|
139
|
+
|
|
140
|
+
Every agent has a settings file with an allow/deny model, and no two of them are the same
|
|
141
|
+
kind of object. Claude Code evaluates an ordered rule list. Gemini CLI keeps tool-name
|
|
142
|
+
allowlists. Codex runs a Starlark program over command prefixes. VS Code holds a map of
|
|
143
|
+
auto-approve patterns. They do **not** have the same expressive power.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
agentseam permissions --rule 'deny:shell:curl *' --rule 'allow:shell:npm test'
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
# claude_code -> .claude/settings.json
|
|
151
|
+
{"permissions": {"allow": ["Bash(npm test)"], "deny": ["Bash(curl *)"]}}
|
|
152
|
+
|
|
153
|
+
# vscode_copilot -> .vscode/settings.json
|
|
154
|
+
{"chat.tools.terminal.autoApprove": {"npm test": true}}
|
|
155
|
+
# unrepresentable: Rule('deny', 'shell', 'curl *') -- this map has no deny: setting a
|
|
156
|
+
# pattern false withholds auto-approval but still lets a human approve the command
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
That second block is the point. VS Code's auto-approve map takes `false` for a pattern,
|
|
160
|
+
which reads like a denylist and is not one — the command still runs once a human clicks
|
|
161
|
+
through. (The `github.copilot.chat.agent.terminal.denyList` key it replaced never blocked
|
|
162
|
+
either.) Rendering a "deny" there would hand you a guardrail that stops nothing, so
|
|
163
|
+
agentseam hands back the rule unrendered with the reason instead, and the command exits
|
|
164
|
+
non-zero. Put it in CI and you find out that your policy doesn't survive the trip to an
|
|
165
|
+
agent *before* you rely on it.
|
|
166
|
+
|
|
167
|
+
The same honesty applies to the gaps we have in ourselves. Every agent the matrix knows
|
|
168
|
+
appears here — either with a recorded model, or named with the reason there isn't one, and
|
|
169
|
+
a test enforces that the two sets add up to the matrix exactly. A silently absent agent
|
|
170
|
+
would read as "nothing to say here" when the truth is "nobody looked".
|
|
171
|
+
|
|
172
|
+
The reasons distinguish two things that are easy to blur: an agent whose permission system
|
|
173
|
+
*provably exists* but whose schema we haven't read (Antigravity, Devin, Grok, Kimi Code all
|
|
174
|
+
prove it through their own hook events) versus one where nothing is established at all. And
|
|
175
|
+
a missing hook surface is never recorded as a missing permission model — Aider and Zed
|
|
176
|
+
expose no hooks, which says nothing about what their config files can restrict.
|
|
177
|
+
|
|
178
|
+
## Bundles: mostly the same directory, twice
|
|
179
|
+
|
|
180
|
+
A Claude Code plugin and a Gemini CLI extension turn out to be nearly the same thing
|
|
181
|
+
underneath two different manifests:
|
|
182
|
+
|
|
183
|
+
| part | Claude Code plugin | Gemini CLI extension | |
|
|
184
|
+
|---|---|---|---|
|
|
185
|
+
| skill | `skills/<name>/SKILL.md` | `skills/<name>/SKILL.md` | identical |
|
|
186
|
+
| subagent | `agents/<name>.md` | `agents/<name>.md` | identical |
|
|
187
|
+
| hooks | `hooks/hooks.json` | `hooks/hooks.json` | identical |
|
|
188
|
+
| command | `commands/<name>.md` | `commands/<name>.toml` | same folder, different format |
|
|
189
|
+
| manifest | `.claude-plugin/plugin.json` | `gemini-extension.json` | different |
|
|
190
|
+
|
|
191
|
+
So one directory serves both, and the real work is the second manifest and writing the
|
|
192
|
+
commands twice. VS Code has no bundle format at all — parts are found by location, so
|
|
193
|
+
committing the file *is* the install — and it reads several of Claude Code's own folders
|
|
194
|
+
natively: `.claude/skills`, `.claude/agents`, `.claude/rules`, and hooks straight out of
|
|
195
|
+
`.claude/settings.json`.
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
agentseam packaging
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
...prints each layout, the templates shared by more than one agent, and which folders an
|
|
202
|
+
agent reads that belong to somebody else. That last line matters in both directions: a
|
|
203
|
+
repo shipping `.claude/skills` is already shipping skills to VS Code, intended or not.
|
|
204
|
+
|
|
205
|
+
`plan(agent, bundle)` renders a bundle into the exact files an agent expects, and — as
|
|
206
|
+
with permissions — hands back what the format cannot hold, with a reason specific to that
|
|
207
|
+
agent. Gemini can't take a `.mcp.json`, but not because it lacks MCP: it declares servers
|
|
208
|
+
in the manifest instead, and saying "no MCP support" would be as wrong as saying nothing.
|
|
209
|
+
|
|
210
|
+
## See it per vendor before you install anything
|
|
211
|
+
|
|
212
|
+
[`examples/generated/`](examples/generated/) has a page for every agent agentseam can hook,
|
|
213
|
+
each showing the **same situation** — an agent about to write a secret into a file it will
|
|
214
|
+
read back later — in that vendor's own dialect: the config `install` writes, the normalized
|
|
215
|
+
event a handler sees, and what `allow` / `deny` / `ask` / `rewrite` each turn into on the
|
|
216
|
+
way back, including the ones that get reduced because the agent cannot express them.
|
|
217
|
+
|
|
218
|
+
There is a section for **every hook each agent supports**, in lifecycle order. Every block
|
|
219
|
+
is generated by running the library, and CI fails if the pages drift from what it actually
|
|
220
|
+
produces — an example nobody regenerates is a claim nobody checks.
|
|
221
|
+
|
|
222
|
+
What the pages cannot do is verify the vendors. Each row records what its claims rest on —
|
|
223
|
+
`live-run`, `live-run-partial`, `vendor-source`, `vendor-docs`, `third-party-install`,
|
|
224
|
+
`inherited` — and most are vendor documentation, which is a claim about what a vendor *says*
|
|
225
|
+
rather than an observation of what their build does. Claude Code's row rests on a full live
|
|
226
|
+
run; Codex CLI, Cursor, and VS Code Copilot each rest on a partial one, with the observed
|
|
227
|
+
events listed on the row. Vendors change hook surfaces without notice, so **verify against
|
|
228
|
+
your own installation before relying on any of it**, and open an issue if a page is wrong.
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
python3 examples/generate.py # rewrite the pages
|
|
232
|
+
python3 examples/generate.py --check # what CI runs
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Verify a claim against your own agent
|
|
236
|
+
|
|
237
|
+
Claude Code's row rests on a full live run; Codex CLI, Cursor, and VS Code Copilot each rest
|
|
238
|
+
on a partial one. If you have another of these agents installed, an hour turns its row from
|
|
239
|
+
"the vendor says so" into evidence:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
python3 tools/capture.py detect
|
|
243
|
+
python3 tools/capture.py install --agent cursor
|
|
244
|
+
# ... use the agent for a minute ...
|
|
245
|
+
python3 tools/capture.py report
|
|
246
|
+
python3 tools/capture.py uninstall --agent cursor
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
The probe always allows, so it cannot interfere with real work, and payloads are reduced to
|
|
250
|
+
shape before anything touches disk — keys and types survive, values do not. See
|
|
251
|
+
[tools/VERIFY.md](tools/VERIFY.md).
|
|
252
|
+
|
|
253
|
+
## Install
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
pip install agentseam
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Supported agents
|
|
260
|
+
|
|
261
|
+
| Agent | Tier | Config |
|
|
262
|
+
|---|---|---|
|
|
263
|
+
| Claude Code | block + rewrite | `.claude/settings.json` |
|
|
264
|
+
| VS Code Copilot | block + rewrite | `.github/hooks/*.json` |
|
|
265
|
+
| Cursor | block + rewrite (all tools, fail-open by default) | `.cursor/hooks.json` |
|
|
266
|
+
| Gemini CLI | block + rewrite (fail-open) | `.gemini/settings.json` |
|
|
267
|
+
| OpenAI Codex CLI | block + rewrite (fail-open) | `.codex/hooks.json` |
|
|
268
|
+
| Windsurf | block via exit code only; **no file-write event** | `.windsurf/hooks.json` |
|
|
269
|
+
| Zed, Aider | no hook surface at all | — |
|
|
270
|
+
| Devin | block + rewrite (fail-open) | `.devin/hooks.v1.json` |
|
|
271
|
+
| Grok CLI | block on PreToolUse only (fail-open) | `.grok/hooks/*.json` |
|
|
272
|
+
| Antigravity | block, and can refuse to let the agent stop (fail-open) | `.agents/hooks.json` |
|
|
273
|
+
| Kimi Code CLI | block on 3 of its 20 events (fail-open) | `config.toml` |
|
|
274
|
+
| Junie CLI | block + ask + rewrite, all native (fail-open) | `~/.junie/config.json` |
|
|
275
|
+
| Tabnine CLI | block on 6 of its 11 events, incl. post-tool (fail-open) | `.tabnine/agent/settings.json` |
|
|
276
|
+
| Replit | no hook surface found in its docs — instruction files work | — |
|
|
277
|
+
|
|
278
|
+
Goose, Crush, OpenCode: adapters planned; the
|
|
279
|
+
capability research is done and each is a module plus a matrix row.
|
|
280
|
+
|
|
281
|
+
## Design
|
|
282
|
+
|
|
283
|
+
- **stdlib only.** No dependencies, ever, in the adapter path — adapters must stay
|
|
284
|
+
copy-portable into other projects that vendor single files.
|
|
285
|
+
- **Adapters own all vendor knowledge.** Adding an agent is a module plus a matrix row;
|
|
286
|
+
no consumer changes.
|
|
287
|
+
- **Ownership-marked wiring.** Install is idempotent and uninstall is surgical: your own
|
|
288
|
+
hooks in the same config are never touched.
|
|
289
|
+
- **The matrix carries provenance.** Every row records the version and date it was
|
|
290
|
+
verified, and how.
|
|
291
|
+
|
|
292
|
+
[ARCHITECTURE.md](ARCHITECTURE.md) explains why those choices, what they cost, and the bug
|
|
293
|
+
classes they exist to prevent.
|
|
294
|
+
|
|
295
|
+
Apache-2.0.
|