sequential-hooks 0.1.0__py3-none-any.whl
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.
- plugins/agy/_sequential_hooks/__init__.py +1 -0
- plugins/agy/_sequential_hooks/_adapter.py +566 -0
- plugins/agy/_sequential_hooks/_doctor.py +413 -0
- plugins/claude/_sequential_hooks/__init__.py +1 -0
- plugins/claude/_sequential_hooks/_adapter.py +560 -0
- plugins/claude/_sequential_hooks/_doctor.py +455 -0
- plugins/codex/_sequential_hooks/__init__.py +1 -0
- plugins/codex/_sequential_hooks/_adapter.py +466 -0
- plugins/codex/_sequential_hooks/_doctor.py +563 -0
- sequential_hooks/__init__.py +3 -0
- sequential_hooks/__main__.py +5 -0
- sequential_hooks/_arguments.py +222 -0
- sequential_hooks/_cleanup.py +88 -0
- sequential_hooks/_cli.py +440 -0
- sequential_hooks/_containment/__init__.py +410 -0
- sequential_hooks/_containment/_posix.py +236 -0
- sequential_hooks/_containment/_uncontained.py +239 -0
- sequential_hooks/_containment/_windows.py +853 -0
- sequential_hooks/_containment/_windows_api.py +570 -0
- sequential_hooks/_containment/_windows_launcher.py +189 -0
- sequential_hooks/_diagnostics.py +265 -0
- sequential_hooks/_doctor/__init__.py +342 -0
- sequential_hooks/_doctor/_command.py +469 -0
- sequential_hooks/_doctor/_common.py +448 -0
- sequential_hooks/_doctor/_types.py +94 -0
- sequential_hooks/_downstream.py +181 -0
- sequential_hooks/_executable.py +187 -0
- sequential_hooks/_executor.py +825 -0
- sequential_hooks/_registry.py +103 -0
- sequential_hooks/_runner.py +48 -0
- sequential_hooks/_types.py +125 -0
- sequential_hooks/hosts/__init__.py +130 -0
- sequential_hooks/hosts/_contract.py +434 -0
- sequential_hooks/hosts/_inspection.py +78 -0
- sequential_hooks/hosts/_json.py +150 -0
- sequential_hooks/hosts/_records.py +273 -0
- sequential_hooks/hosts/_skeleton.py +1326 -0
- sequential_hooks/py.typed +0 -0
- sequential_hooks-0.1.0.dist-info/METADATA +90 -0
- sequential_hooks-0.1.0.dist-info/RECORD +43 -0
- sequential_hooks-0.1.0.dist-info/WHEEL +4 -0
- sequential_hooks-0.1.0.dist-info/entry_points.txt +7 -0
- sequential_hooks-0.1.0.dist-info/licenses/LICENSE +21 -0
|
File without changes
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: sequential-hooks
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Run coding-agent hooks in order with agent-specific response handling
|
|
5
|
+
Project-URL: Documentation, https://github.com/dactylo/sequential-hooks/tree/main/docs
|
|
6
|
+
Project-URL: Homepage, https://github.com/dactylo/sequential-hooks
|
|
7
|
+
Project-URL: Issues, https://github.com/dactylo/sequential-hooks/issues
|
|
8
|
+
Project-URL: Repository, https://github.com/dactylo/sequential-hooks
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: coding-agents,hooks,orchestration,sequential
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.13
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# sequential-hooks
|
|
21
|
+
|
|
22
|
+
`sequential-hooks` runs coding-agent hooks in a strict order. Without a wrapper, a host may start
|
|
23
|
+
several hooks concurrently or in an undocumented order. A validator can then inspect an old tool
|
|
24
|
+
input while another hook is still replacing it. Register one wrapper hook and place the former hook
|
|
25
|
+
commands inside it as ordered steps.
|
|
26
|
+
|
|
27
|
+
## Quick start
|
|
28
|
+
|
|
29
|
+
`sequential-hooks` requires native CPython 3.13 or newer and `uv`. The project is not published to
|
|
30
|
+
a package index. Install the current checkout from the repository root:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
uv tool install .
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To update an existing installation after pulling changes:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
uv tool install --reinstall .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
sequential-hooks has no configuration file. Choose the coding agent that will run the wrapper, then
|
|
43
|
+
add the registration from its setup guide:
|
|
44
|
+
|
|
45
|
+
- [Claude Code](plugins/claude/README.md)
|
|
46
|
+
- [Codex](plugins/codex/README.md)
|
|
47
|
+
- [Antigravity](plugins/agy/README.md)
|
|
48
|
+
|
|
49
|
+
Check [compatibility](docs/compatibility.md) for the recorded host versions and known host limits,
|
|
50
|
+
and [platforms](docs/platforms.md) for process handling. The guides use `first-hook`,
|
|
51
|
+
`second-hook`, and `audit-hook` as sample child commands. Replace them with hooks you have
|
|
52
|
+
installed and want to run in order. Move those child hooks into the wrapper and remove their
|
|
53
|
+
separate registrations, or the host may still start duplicate copies concurrently.
|
|
54
|
+
|
|
55
|
+
The wrapper command expects a native host payload on stdin. Configure it as a host hook rather than
|
|
56
|
+
running the hook command interactively. After saving the registration, inspect it with the matching
|
|
57
|
+
read-only report:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
sequential-hooks doctor --agent claude
|
|
61
|
+
sequential-hooks doctor --agent codex
|
|
62
|
+
sequential-hooks doctor --agent agy
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Exit 0 means the findings are informational. Exit 1 means at least one warning or error needs
|
|
66
|
+
action. The [troubleshooting guide](docs/troubleshooting.md) explains common findings.
|
|
67
|
+
|
|
68
|
+
Antigravity requires an explicit event in each hook command. An all-neutral Antigravity pre-tool
|
|
69
|
+
chain emits the host's real automatic `allow` decision; it does not preserve the ordinary
|
|
70
|
+
permission prompt. Review the [Antigravity setup guide](plugins/agy/README.md) before enabling it.
|
|
71
|
+
|
|
72
|
+
## How commands compose
|
|
73
|
+
|
|
74
|
+
`-a, --agent` selects the installed host adapter for a coding agent. The built-in names are
|
|
75
|
+
`claude`, `codex`, and `agy`; a third-party adapter installed with
|
|
76
|
+
`uv tool install . --with PACKAGE` is selected by its own name. Nothing is inferred from the
|
|
77
|
+
payload. See [adding a host](docs/adding-a-host.md).
|
|
78
|
+
|
|
79
|
+
`-h, --help` prints help for wrapper mode; `doctor -h` and `doctor --help` print doctor help.
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
sequential-hooks --agent codex --step-timeout 30 defsort hook --agent codex -- docwrap hook --agent codex
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The exact `--` token separates steps and cannot be passed to a step. Each child receives its own
|
|
86
|
+
literal arguments, including its own `--agent`; wrapper options are not inherited by child
|
|
87
|
+
commands.
|
|
88
|
+
|
|
89
|
+
Continue with the [documentation map](docs/README.md), [concepts](docs/concepts.md),
|
|
90
|
+
[security](docs/security.md), or the [CLI reference](docs/reference/cli.md).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
plugins/agy/_sequential_hooks/__init__.py,sha256=dTZEBtKRD1GdzsT0AubMMAMGhlIQMnOn4swM9D0VyZE,62
|
|
2
|
+
plugins/agy/_sequential_hooks/_adapter.py,sha256=zCECOdL9YMHnbCzaKgyCp5pMu91fSf0xpaDflAqF_Rs,20446
|
|
3
|
+
plugins/agy/_sequential_hooks/_doctor.py,sha256=EQPL9MSWrkFAUm_HrQgf6UjQq55mj60dH6rorykbutQ,14254
|
|
4
|
+
plugins/claude/_sequential_hooks/__init__.py,sha256=dIMnFvBrwcPQUq0FOBSLgMbunMP-8zEsFTfUliDVqWs,62
|
|
5
|
+
plugins/claude/_sequential_hooks/_adapter.py,sha256=_PXH-A0IPdBQdgd_Q42wwVvMfA9E-2EMp_MSL9Q_CXw,21881
|
|
6
|
+
plugins/claude/_sequential_hooks/_doctor.py,sha256=p9wICT-yIfU7uJwqzqx1xjxplhTKbRpoyu_xHZYOdTk,15918
|
|
7
|
+
plugins/codex/_sequential_hooks/__init__.py,sha256=njF3GC_YmuV9Fb2u58CxiEBF_z5EkWACmG1iN5kxKx0,56
|
|
8
|
+
plugins/codex/_sequential_hooks/_adapter.py,sha256=_jxyUIbdDZgcf64ogmbwODJTpKRmg-3oFGFdx6Difgg,18231
|
|
9
|
+
plugins/codex/_sequential_hooks/_doctor.py,sha256=VYakEFwohFo39o_kKlJxqJdorfLc1_sBNAPdFHESZgg,19674
|
|
10
|
+
sequential_hooks/__init__.py,sha256=maAJHO80HHqUBX7xVjQTjCrT824X5aDMv5S69CIb6wk,93
|
|
11
|
+
sequential_hooks/__main__.py,sha256=yPZGGOOECze1PH9D_ood5Q-VbwLf2Jc1iUalCIf1RkI,123
|
|
12
|
+
sequential_hooks/_arguments.py,sha256=F-AXpYqwjPXM1cD14Lk3JchD0iXt9JCaJuaQbT7amBo,7599
|
|
13
|
+
sequential_hooks/_cleanup.py,sha256=GGItNX8CuG9mLhk4bzwE_78RyHctt6_4pWiX7gt0LE4,2716
|
|
14
|
+
sequential_hooks/_cli.py,sha256=nCTe5US2v7o7NX8jFQ12le40TslZwGM7enoasr6adX0,14653
|
|
15
|
+
sequential_hooks/_diagnostics.py,sha256=Os57us1DrY1P5mtwgiVCyMU_pwesnR3gCAzs1wM_uew,9940
|
|
16
|
+
sequential_hooks/_downstream.py,sha256=8UYwf93nH8cI8Y6boV6VbA2tD3YIIyLVVWzjzR0GnCo,5738
|
|
17
|
+
sequential_hooks/_executable.py,sha256=uGdAJWnsNV55PYy7h8AAf84jUWwbqo2-ty15zo9zhTM,6650
|
|
18
|
+
sequential_hooks/_executor.py,sha256=mM6r5cgUzrLdlKNnvsbepKD8hzUYGJIS7V43kwdF9H0,29527
|
|
19
|
+
sequential_hooks/_registry.py,sha256=fKpi5si268IIhrkfcxfvwqFpxpupM_JcyKvTsac9hI4,3410
|
|
20
|
+
sequential_hooks/_runner.py,sha256=KJrYk8P7i2wArix41npWYx7D8nug4eg41XqPZnwrS8Y,1552
|
|
21
|
+
sequential_hooks/_types.py,sha256=UrAsFkX-APOHoUqtW8z00IKbodjKwCIuURJUItjPgVg,3913
|
|
22
|
+
sequential_hooks/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
+
sequential_hooks/_containment/__init__.py,sha256=bQ7Y2XSUsFAlaB3zMgZxfC4_IVDrUcm0S78O7bzclWo,12775
|
|
24
|
+
sequential_hooks/_containment/_posix.py,sha256=4VSdVglTD_Hk45BWuX91N_SgVlHVIqy7kFHsFXmvUFc,8400
|
|
25
|
+
sequential_hooks/_containment/_uncontained.py,sha256=eTu_iJY9UlK2qZnNVX6PE_nqrjMeGzP9Z_9TC8CqnFI,8302
|
|
26
|
+
sequential_hooks/_containment/_windows.py,sha256=yTzbE7GdFo-bexiUXvhj-zaXsgpeduGcEs0_3UJiLBg,31911
|
|
27
|
+
sequential_hooks/_containment/_windows_api.py,sha256=-StOe2kW_3woUTa4WDM0VqTAWscMK9D3VGJ_negj_PI,21317
|
|
28
|
+
sequential_hooks/_containment/_windows_launcher.py,sha256=TnbzPWHLq2SZpU7O6jDSHy35njOrZfKDQOR3Ki4QwDg,6118
|
|
29
|
+
sequential_hooks/_doctor/__init__.py,sha256=x1sfp36ZpfxFxEfqta79p-HLqy48zX6b9tsVXzUjppQ,11627
|
|
30
|
+
sequential_hooks/_doctor/_command.py,sha256=P1X7pKOxaG9_j9mIW9r7kzJsoKlwFBJdw8DMyJvYTT0,15413
|
|
31
|
+
sequential_hooks/_doctor/_common.py,sha256=9s1GO0FIwcuzaQDoBDWWC8Ebg2FsnhI0Ori8AiezAbI,16068
|
|
32
|
+
sequential_hooks/_doctor/_types.py,sha256=YlQZ8B4AWvduJisKV0EkXPX-GCk26Zmt07ETnVgafWE,3159
|
|
33
|
+
sequential_hooks/hosts/__init__.py,sha256=mg6fJlX7u_a0iuGJIoFyhsUqa1_siJlVlPYELPJZi2E,2972
|
|
34
|
+
sequential_hooks/hosts/_contract.py,sha256=0yWNs3GoY_eWKSjZZq8yAQlk9u4qX6dy6V1kevQ3ywg,11668
|
|
35
|
+
sequential_hooks/hosts/_inspection.py,sha256=WEcnmxQvkjl0RzNguUoaUpwKqUilO8ic3Sn9XZIW1QQ,2182
|
|
36
|
+
sequential_hooks/hosts/_json.py,sha256=r1Ftdz37p9xCyoOdl0kWo0uOS0SS01qqB7BbcWVUXoY,5043
|
|
37
|
+
sequential_hooks/hosts/_records.py,sha256=lXzma2dVYGaqi_Vs1K8XC4OJb07Ul1jAyIe0RVbrDuk,8603
|
|
38
|
+
sequential_hooks/hosts/_skeleton.py,sha256=NsjE4Ir_500ADWFinvEARaUUvj7nuR239z-UjgMFulE,50099
|
|
39
|
+
sequential_hooks-0.1.0.dist-info/METADATA,sha256=MX6yCesC8uyIup6QZY4SKQ-o9BHsIezRHc955g3w-1c,3945
|
|
40
|
+
sequential_hooks-0.1.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
41
|
+
sequential_hooks-0.1.0.dist-info/entry_points.txt,sha256=hAcwzypfWMMR32w83xbeW5DewPBDOvBzIgplgb-s8OQ,264
|
|
42
|
+
sequential_hooks-0.1.0.dist-info/licenses/LICENSE,sha256=jD2joRxV1aM8CIHIK8QG-GWX5Q0z9lrzH_WpBAfruBY,1085
|
|
43
|
+
sequential_hooks-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
[console_scripts]
|
|
2
|
+
sequential-hooks = sequential_hooks._cli:main
|
|
3
|
+
|
|
4
|
+
[sequential_hooks.hosts]
|
|
5
|
+
agy = plugins.agy._sequential_hooks._adapter:AgyHost
|
|
6
|
+
claude = plugins.claude._sequential_hooks._adapter:ClaudeHost
|
|
7
|
+
codex = plugins.codex._sequential_hooks._adapter:CodexHost
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 the sequential-hooks authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|