dotagents-cli 0.6.0__tar.gz → 0.6.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.
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/CHANGELOG.md +13 -1
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/PKG-INFO +1 -1
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/__init__.py +1 -1
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_hooks.py +13 -2
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_hooks.py +35 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/.gitignore +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/LICENSE +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/README.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/agents.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/cli.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/commands.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/context.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/env.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/fs.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/hooks.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/merge.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/overlays.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/reference.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/resources.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/scope.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/skills.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/sources.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/api/wrappers.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/changelog.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/guide/authoring.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/guide/commands.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/guide/install.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/guide/overlays.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/guide/private-sync.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/docs/index.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/install.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/mkdocs.yml +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/pyproject.toml +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/AGENTS.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/__main__.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_agents.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_context.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_env.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_fs.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_merge.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/cmds/findings.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/cmds/launch.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/hooks/preinvocation_antigravity_context.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/hooks/pretooluse_codex_env.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/hooks/sessionstart_codex_context.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/templates/AGENTS.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/templates/PROJECT.md +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlays.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_resources.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_scope.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_skills.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_sources.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_wrappers.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/cli/__init__.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/cli/_common.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/cli/about.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/cli/build_pyz.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/cli/context.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/cli/env.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/cli/init.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/cli/overlays.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/cli/path.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/py.typed +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/_helpers.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/_shell.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/conftest.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_about.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_agents.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_api_header.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_audit_leak.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_build_pyz.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_cli_main.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_cloud_setup.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_cmds_discovery.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_context.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_env.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_env_cli_scope.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_env_format.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_env_regressions.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_env_safety.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_findings_cmd.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_fix_adapters.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_fix_cli.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_fix_env.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_fix_hooks.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_fix_init.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_fix_overlays.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_fix_packaging.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_fix_scope_context.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_fix_skills_adapters.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_init_base.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_last_mile.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_launch_cmd.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_overlay_libs.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_overlays_cli.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_overlays_command.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_path_timeout_frontmatter.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_powershell_env_hook.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_review_security.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_scope.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_sources.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_sources_uri.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_wire_hooks.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tests/test_wrappers.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tools/audit.py +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tools/cloud-setup.sh +0 -0
- {dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/tools/pyz_smoke.sh +0 -0
|
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.6.1] - 2026-09-27
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Re-running `init` after an upgrade from 0.5.x replaces the `CwdChanged` hooks
|
|
15
|
+
and Codex's `PreToolUse` hook that release wrote, instead of adding the new
|
|
16
|
+
ones beside them (every `cd` ran both, and the old one still wrote the
|
|
17
|
+
unquoted project path). A hook an earlier release wrote is recognised by its
|
|
18
|
+
label and a command that runs dotagents, reads `AGENTS.md` or
|
|
19
|
+
`AGENTS_PROJECT_ROOT`, or runs one of dotagents' hook scripts.
|
|
20
|
+
|
|
10
21
|
## [0.6.0] - 2026-09-25
|
|
11
22
|
|
|
12
23
|
### Added
|
|
@@ -1280,7 +1291,8 @@ Patch release: the PATH/POSIX-conversion fix above (the only change since 0.3.0)
|
|
|
1280
1291
|
affected module sources (`dotagents.cli`, `duho.presets`) to extracted temp files
|
|
1281
1292
|
before dispatch; a no-op for a plain install.
|
|
1282
1293
|
|
|
1283
|
-
[Unreleased]: https://github.com/jose-pr/dotagents/compare/v0.6.
|
|
1294
|
+
[Unreleased]: https://github.com/jose-pr/dotagents/compare/v0.6.1...HEAD
|
|
1295
|
+
[0.6.1]: https://github.com/jose-pr/dotagents/compare/v0.6.0...v0.6.1
|
|
1284
1296
|
[0.6.0]: https://github.com/jose-pr/dotagents/compare/v0.5.1...v0.6.0
|
|
1285
1297
|
[0.5.1]: https://github.com/jose-pr/dotagents/compare/v0.5.0...v0.5.1
|
|
1286
1298
|
[0.5.0]: https://github.com/jose-pr/dotagents/compare/v0.4.0...v0.5.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: dotagents-cli
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: The dotagents CLI: install and manage a portable ~/.agents config for AI coding agents
|
|
5
5
|
Project-URL: Homepage, https://github.com/jose-pr/dotagents/
|
|
6
6
|
Project-URL: Repository, https://github.com/jose-pr/dotagents
|
|
@@ -25,6 +25,7 @@ the ``.pyz``.
|
|
|
25
25
|
from __future__ import annotations
|
|
26
26
|
|
|
27
27
|
import json
|
|
28
|
+
import re
|
|
28
29
|
from pathlib import Path
|
|
29
30
|
from typing import Any, Optional
|
|
30
31
|
|
|
@@ -32,9 +33,19 @@ from typing import Any, Optional
|
|
|
32
33
|
#: Our hooks' statusMessage is `STATUS_PREFIX + label`, so a foreign hook that
|
|
33
34
|
#: happens to use the same generic label ("Loading agent context") is never
|
|
34
35
|
#: taken for ours. The bare label an earlier release wrote is still ours when
|
|
35
|
-
#: the hook's command
|
|
36
|
+
#: the hook's command is recognisably dotagents' (:data:`_LEGACY_COMMAND`), so
|
|
37
|
+
#: those hooks converge to the new one instead of running beside it.
|
|
36
38
|
STATUS_PREFIX = "dotagents: "
|
|
37
39
|
|
|
40
|
+
#: What every command an earlier release wrote contains: `dotagents` itself
|
|
41
|
+
#: (SessionStart, the PowerShell loader), the project pin or `AGENTS.md`
|
|
42
|
+
#: (CwdChanged, which never names dotagents), or one of the deployed hook
|
|
43
|
+
#: scripts (Codex, Antigravity: `python3 ".../pretooluse_codex_env.py"`).
|
|
44
|
+
_LEGACY_COMMAND = re.compile(
|
|
45
|
+
r"dotagents|AGENTS_PROJECT_ROOT|AGENTS\.md"
|
|
46
|
+
r"|(?:sessionstart_codex_context|pretooluse_codex_env|preinvocation_antigravity_context)\.py"
|
|
47
|
+
)
|
|
48
|
+
|
|
38
49
|
#: The hook keys dotagents manages; any other key a user added (a `timeout`,
|
|
39
50
|
#: say) survives a refresh.
|
|
40
51
|
_MANAGED_KEYS = frozenset({"type", "command", "shell", "commandWindows", "statusMessage"})
|
|
@@ -56,7 +67,7 @@ def _labelled_ours(hook: Any, status_message: "Optional[str]") -> bool:
|
|
|
56
67
|
status = hook.get("statusMessage")
|
|
57
68
|
if status == labels[0]:
|
|
58
69
|
return True
|
|
59
|
-
return status == labels[1] and
|
|
70
|
+
return status == labels[1] and bool(_LEGACY_COMMAND.search(str(hook.get("command", ""))))
|
|
60
71
|
|
|
61
72
|
|
|
62
73
|
def build_hook_entry(
|
|
@@ -191,3 +191,38 @@ def test_status_match_does_not_touch_a_foreign_hook():
|
|
|
191
191
|
commands = [h["command"] for e in merged for h in e["hooks"]]
|
|
192
192
|
assert "mine" in commands
|
|
193
193
|
assert CMD in commands
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
# The exact commands 0.5.x wrote. CwdChanged never named dotagents, and the
|
|
197
|
+
# Codex loader names only its script, so recognising a legacy hook by
|
|
198
|
+
# "dotagents" in its command left them in place beside the new ones.
|
|
199
|
+
_CWD_051 = (
|
|
200
|
+
'if [ -n "$CLAUDE_ENV_FILE" ] && [ -d .agents ]; then printf "export '
|
|
201
|
+
"AGENTS_PROJECT_ROOT='%s'\\n\" \"$(pwd -W 2>/dev/null || pwd)\" >> \"$CLAUDE_ENV_FILE\"; "
|
|
202
|
+
'fi; [ -f AGENTS.md ] && cat AGENTS.md || true'
|
|
203
|
+
)
|
|
204
|
+
_CWD_051_PS = (
|
|
205
|
+
"if (-not (Get-Command bash -ErrorAction SilentlyContinue)) { if (Test-Path AGENTS.md) "
|
|
206
|
+
"{ Get-Content AGENTS.md -Raw } }"
|
|
207
|
+
)
|
|
208
|
+
_CODEX_051 = 'python3 "/home/u/.codex/hooks/pretooluse_codex_env.py"'
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
@pytest.mark.parametrize("old, label", [
|
|
212
|
+
(_CWD_051, "Checking for AGENTS.md"),
|
|
213
|
+
(_CWD_051_PS, "Checking for AGENTS.md (PowerShell)"),
|
|
214
|
+
(_CODEX_051, "Loading agent env"),
|
|
215
|
+
])
|
|
216
|
+
def test_every_hook_an_earlier_release_wrote_converges(old, label):
|
|
217
|
+
legacy = {"hooks": [{"type": "command", "command": old, "statusMessage": label}]}
|
|
218
|
+
merged, changed = _hooks.merge_hook([legacy], "NEW", status_message=label)
|
|
219
|
+
assert changed and len(merged) == 1, merged
|
|
220
|
+
assert merged[0]["hooks"][0]["command"] == "NEW"
|
|
221
|
+
assert merged[0]["hooks"][0]["statusMessage"] == "dotagents: " + label
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def test_a_foreign_hook_with_our_bare_label_and_unrelated_command_stays():
|
|
225
|
+
foreign = {"hooks": [{"type": "command", "command": "notify-send hi",
|
|
226
|
+
"statusMessage": "Checking for AGENTS.md"}]}
|
|
227
|
+
merged, _ = _hooks.merge_hook([foreign], "NEW", status_message="Checking for AGENTS.md")
|
|
228
|
+
assert merged[0] == foreign and len(merged) == 2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/cmds/findings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/templates/AGENTS.md
RENAMED
|
File without changes
|
{dotagents_cli-0.6.0 → dotagents_cli-0.6.1}/src/dotagents/_overlay/dotagents/templates/PROJECT.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|