dotagents-cli 0.7.4__tar.gz → 0.7.6__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.7.4 → dotagents_cli-0.7.6}/CHANGELOG.md +56 -1
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/PKG-INFO +16 -10
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/README.md +3 -2
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/guide/commands.md +15 -12
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/guide/install.md +6 -3
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/guide/overlays.md +5 -4
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/install.py +2 -2
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/pyproject.toml +14 -7
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/AGENTS.md +21 -11
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/__init__.py +1 -1
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_env.py +2 -2
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_resources.py +2 -2
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_skills.py +1 -1
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_sources.py +19 -18
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/cli/__init__.py +29 -157
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/cli/about.py +2 -2
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/cli/build_pyz.py +47 -22
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_about.py +3 -3
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_build_pyz.py +18 -3
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_cli_main.py +2 -2
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_cmds_discovery.py +15 -2
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_fix_cli.py +0 -53
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_fix_init.py +5 -6
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_sources_uri.py +2 -2
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tools/pyz_smoke.sh +8 -8
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/.gitignore +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/LICENSE +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/agents.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/cli.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/commands.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/context.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/env.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/fs.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/hooks.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/merge.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/overlays.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/reference.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/resources.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/scope.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/skills.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/sources.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/api/wrappers.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/changelog.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/guide/authoring.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/guide/private-sync.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/docs/index.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/mkdocs.yml +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/__main__.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_agents.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_context.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_fs.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_hooks.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_ignore.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_merge.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_overlay/dotagents/cmds/findings.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_overlay/dotagents/cmds/launch.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_overlay/dotagents/hooks/preinvocation_antigravity_context.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_overlay/dotagents/hooks/pretooluse_codex_env.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_overlay/dotagents/hooks/sessionstart_codex_context.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_overlay/dotagents/templates/AGENTS.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_overlay/dotagents/templates/PROJECT.md +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_overlays.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_scope.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/_wrappers.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/cli/_common.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/cli/context.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/cli/env.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/cli/init.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/cli/overlays.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/cli/path.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/src/dotagents/py.typed +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/_helpers.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/_shell.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/conftest.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_agents.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_api_header.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_audit_leak.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_cloud_setup.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_context.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_env.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_env_cli_scope.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_env_format.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_env_into.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_env_regressions.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_env_safety.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_findings_cmd.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_fix_adapters.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_fix_env.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_fix_hooks.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_fix_overlays.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_fix_packaging.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_fix_scope_context.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_fix_skills_adapters.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_git_ssl_revoke.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_hooks.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_ignore.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_init_base.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_last_mile.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_launch_cmd.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_local_additions.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_mcp.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_no_internal_labels.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_overlay_libs.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_overlays_cli.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_overlays_command.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_path_timeout_frontmatter.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_powershell_env_hook.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_quoting_injection_safety.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_scope.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_sources.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_wire_hooks.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tests/test_wrappers.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tools/audit.py +0 -0
- {dotagents_cli-0.7.4 → dotagents_cli-0.7.6}/tools/cloud-setup.sh +0 -0
|
@@ -7,6 +7,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.6] - 2026-10-15
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- A `repo` extra (`repopath[uri]`) for overlay sources at `github:`, `gitlab:` and
|
|
15
|
+
`repo:` URIs, which the `uri` extra no longer brings.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- dotagents depends on `pathapi` (`>=0.1.0,<0.2`), the new name of `pathlib_next`,
|
|
20
|
+
instead of `pathlib_next`. The `.pyz` vendors it; `build-pyz --pathapi-version`
|
|
21
|
+
names its pin, and `--pathlib-next-version` still works. On Python 3.9 nothing
|
|
22
|
+
else has to be installed for it.
|
|
23
|
+
- The extras install pathapi's own distributions: `uri` and `http` install
|
|
24
|
+
`pathapi-uri` (the URI layer, imported as `uripath`, with `file:`, `http(s):`,
|
|
25
|
+
`dav:`, `ftp:`, `zip:` and `tar:` on the standard library); `sftp` adds
|
|
26
|
+
`sftppath[paramiko]` and `s3` adds `objpath[s3]`. Overlay sources are read as
|
|
27
|
+
before. A `git:` URI is not a scheme any more; a repository tree is a `repo:` URI.
|
|
28
|
+
- `build-pyz --extras` vendors what the named extras install, each distribution at
|
|
29
|
+
its floor, and refuses an extra it does not know.
|
|
30
|
+
- `about` lists `pathapi`, `pathapi-uri`, `netimps` and the plugin distributions in
|
|
31
|
+
place of `pathlib_next`, `uritools` and `requests`.
|
|
32
|
+
|
|
33
|
+
### Removed
|
|
34
|
+
|
|
35
|
+
- The `.pyz` no longer extracts the built-in command modules' sources to temporary
|
|
36
|
+
files at startup: duho reads a command's flags and help through the zip importer
|
|
37
|
+
when the module has no file on disk.
|
|
38
|
+
|
|
39
|
+
## [0.7.5] - 2026-10-14
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- `main()` runs through `duho.run(..., exit=False)`: it always returns the status
|
|
44
|
+
instead of raising `SystemExit` for a message, `--help` or a usage error (the
|
|
45
|
+
console script, `python -m dotagents` and `install.py` exit with it as before, with
|
|
46
|
+
the same statuses and the same text on standard error). Ctrl-C now ends with
|
|
47
|
+
status 130 and no traceback, and a closed pipe on standard output ends with
|
|
48
|
+
status 1, quietly.
|
|
49
|
+
- The `duho` floor moves to `>=0.7.5,<0.8` (from `>=0.6.0,<0.7`); the vendored
|
|
50
|
+
`.pyz` pin (`build-pyz --duho-version`) moves with it. No flag, exit status or
|
|
51
|
+
output changes.
|
|
52
|
+
- Command modules are loaded with duho's own `discover_commands(on_error=...)`
|
|
53
|
+
instead of a copy of its loop built on a private duho name. A module that fails
|
|
54
|
+
to import is still named in a warning and skipped, and the listing order is
|
|
55
|
+
unchanged. A command module may now import a sibling helper file by its bare
|
|
56
|
+
name.
|
|
57
|
+
- `kebab_name` delegates to `duho.text.kebabcase`; its results are unchanged.
|
|
58
|
+
- Discovered commands are listed in discovery order with `discover_commands(sort=False)`
|
|
59
|
+
instead of being re-sorted here, and a command that cannot build its parser is
|
|
60
|
+
found out with `duho.runtime.build_command_parser` instead of a private duho
|
|
61
|
+
helper. Output, exit statuses and which commands are skipped are unchanged.
|
|
62
|
+
|
|
10
63
|
## [0.7.4] - 2026-10-14
|
|
11
64
|
|
|
12
65
|
### Added
|
|
@@ -1417,7 +1470,9 @@ Patch release: the PATH/POSIX-conversion fix above (the only change since 0.3.0)
|
|
|
1417
1470
|
affected module sources (`dotagents.cli`, `duho.presets`) to extracted temp files
|
|
1418
1471
|
before dispatch; a no-op for a plain install.
|
|
1419
1472
|
|
|
1420
|
-
[Unreleased]: https://github.com/jose-pr/dotagents/compare/v0.7.
|
|
1473
|
+
[Unreleased]: https://github.com/jose-pr/dotagents/compare/v0.7.6...HEAD
|
|
1474
|
+
[0.7.6]: https://github.com/jose-pr/dotagents/compare/v0.7.5...v0.7.6
|
|
1475
|
+
[0.7.5]: https://github.com/jose-pr/dotagents/compare/v0.7.4...v0.7.5
|
|
1421
1476
|
[0.7.4]: https://github.com/jose-pr/dotagents/compare/v0.7.3...v0.7.4
|
|
1422
1477
|
[0.7.3]: https://github.com/jose-pr/dotagents/compare/v0.7.2...v0.7.3
|
|
1423
1478
|
[0.7.2]: https://github.com/jose-pr/dotagents/compare/v0.7.1...v0.7.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: dotagents-cli
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.6
|
|
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
|
|
@@ -23,13 +23,13 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
23
23
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
24
|
Classifier: Typing :: Typed
|
|
25
25
|
Requires-Python: >=3.9
|
|
26
|
-
Requires-Dist: duho<0.
|
|
27
|
-
Requires-Dist:
|
|
26
|
+
Requires-Dist: duho<0.8,>=0.7.5
|
|
27
|
+
Requires-Dist: pathapi<0.2,>=0.1.0
|
|
28
28
|
Requires-Dist: tomli>=1.1.0; python_version < '3.11'
|
|
29
29
|
Provides-Extra: dev
|
|
30
30
|
Requires-Dist: build; extra == 'dev'
|
|
31
31
|
Requires-Dist: hatchling>=1.27; extra == 'dev'
|
|
32
|
-
Requires-Dist:
|
|
32
|
+
Requires-Dist: pathapi-uri<0.2,>=0.1.0; extra == 'dev'
|
|
33
33
|
Requires-Dist: pytest; extra == 'dev'
|
|
34
34
|
Requires-Dist: pyyaml; extra == 'dev'
|
|
35
35
|
Provides-Extra: docs
|
|
@@ -37,13 +37,18 @@ Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
|
|
|
37
37
|
Requires-Dist: mkdocs>=1.5; extra == 'docs'
|
|
38
38
|
Requires-Dist: mkdocstrings[python]>=0.24; extra == 'docs'
|
|
39
39
|
Provides-Extra: http
|
|
40
|
-
Requires-Dist:
|
|
40
|
+
Requires-Dist: pathapi-uri<0.2,>=0.1.0; extra == 'http'
|
|
41
|
+
Provides-Extra: repo
|
|
42
|
+
Requires-Dist: pathapi-uri<0.2,>=0.1.0; extra == 'repo'
|
|
43
|
+
Requires-Dist: repopath[uri]<0.2,>=0.1.0; extra == 'repo'
|
|
41
44
|
Provides-Extra: s3
|
|
42
|
-
Requires-Dist:
|
|
45
|
+
Requires-Dist: objpath[s3]<0.2,>=0.1.0; extra == 's3'
|
|
46
|
+
Requires-Dist: pathapi-uri<0.2,>=0.1.0; extra == 's3'
|
|
43
47
|
Provides-Extra: sftp
|
|
44
|
-
Requires-Dist:
|
|
48
|
+
Requires-Dist: pathapi-uri<0.2,>=0.1.0; extra == 'sftp'
|
|
49
|
+
Requires-Dist: sftppath[paramiko]<0.2,>=0.1.0; extra == 'sftp'
|
|
45
50
|
Provides-Extra: uri
|
|
46
|
-
Requires-Dist:
|
|
51
|
+
Requires-Dist: pathapi-uri<0.2,>=0.1.0; extra == 'uri'
|
|
47
52
|
Provides-Extra: yaml
|
|
48
53
|
Requires-Dist: pyyaml; extra == 'yaml'
|
|
49
54
|
Description-Content-Type: text/markdown
|
|
@@ -156,7 +161,8 @@ dotagents init --force # replace AGENTS.md's content wholesale
|
|
|
156
161
|
|
|
157
162
|
`--from <source>` selects another *base*: a base overlay directory, a dotagents
|
|
158
163
|
checkout (its `src/dotagents/_overlay`), a `file:`, `http(s):`, `zip:`, `sftp:` or `s3:`
|
|
159
|
-
URI (`pip install "dotagents-cli[uri]"` for all but `file
|
|
164
|
+
URI (`pip install "dotagents-cli[uri]"` for all but `file:`, plus `[sftp]` or `[s3]`
|
|
165
|
+
for those schemes), or a git repository
|
|
160
166
|
(`repo[@ref][#path]`). A remote one is fetched into `<user store>/.cache/overlays/`.
|
|
161
167
|
The bundled base ships inside the package, so `--from` is only for a base of your own.
|
|
162
168
|
`init` records it (without any credentials in the URL), and later `init` and
|
|
@@ -239,7 +245,7 @@ authors:
|
|
|
239
245
|
|
|
240
246
|
### Downloadable `dotagents.pyz`
|
|
241
247
|
|
|
242
|
-
A self-contained zipapp with `duho`, `
|
|
248
|
+
A self-contained zipapp with `duho`, `pathapi` and `tomli` bundled in (pure
|
|
243
249
|
Python, so one file runs on any OS and on Python 3.9+), so it needs no
|
|
244
250
|
`pip install`. Each release attaches one:
|
|
245
251
|
<https://github.com/jose-pr/dotagents/releases/latest/download/dotagents.pyz>.
|
|
@@ -106,7 +106,8 @@ dotagents init --force # replace AGENTS.md's content wholesale
|
|
|
106
106
|
|
|
107
107
|
`--from <source>` selects another *base*: a base overlay directory, a dotagents
|
|
108
108
|
checkout (its `src/dotagents/_overlay`), a `file:`, `http(s):`, `zip:`, `sftp:` or `s3:`
|
|
109
|
-
URI (`pip install "dotagents-cli[uri]"` for all but `file
|
|
109
|
+
URI (`pip install "dotagents-cli[uri]"` for all but `file:`, plus `[sftp]` or `[s3]`
|
|
110
|
+
for those schemes), or a git repository
|
|
110
111
|
(`repo[@ref][#path]`). A remote one is fetched into `<user store>/.cache/overlays/`.
|
|
111
112
|
The bundled base ships inside the package, so `--from` is only for a base of your own.
|
|
112
113
|
`init` records it (without any credentials in the URL), and later `init` and
|
|
@@ -189,7 +190,7 @@ authors:
|
|
|
189
190
|
|
|
190
191
|
### Downloadable `dotagents.pyz`
|
|
191
192
|
|
|
192
|
-
A self-contained zipapp with `duho`, `
|
|
193
|
+
A self-contained zipapp with `duho`, `pathapi` and `tomli` bundled in (pure
|
|
193
194
|
Python, so one file runs on any OS and on Python 3.9+), so it needs no
|
|
194
195
|
`pip install`. Each release attaches one:
|
|
195
196
|
<https://github.com/jose-pr/dotagents/releases/latest/download/dotagents.pyz>.
|
|
@@ -359,7 +359,7 @@ form and drop names that are not shell identifiers.
|
|
|
359
359
|
`<NAME_OVERLAY_ROOT>` placeholder, so an env file and a context file refer to an
|
|
360
360
|
overlay's install dir by one name. When `dotagents` runs from a `.pyz`,
|
|
361
361
|
`AGENTS_PYLIB` names that archive: the libraries it bundles (duho,
|
|
362
|
-
|
|
362
|
+
pathapi) import from it, so an overlay built on them appends it to
|
|
363
363
|
`sys.path` when its own import fails. An installed `dotagents` sets nothing,
|
|
364
364
|
since those libraries are already in `AGENTS_PYTHON`'s site-packages. It is
|
|
365
365
|
never put on `PYTHONPATH`, where it would shadow a project's own copy.
|
|
@@ -572,35 +572,38 @@ See [Private sync](private-sync.md) for the full walkthrough.
|
|
|
572
572
|
## about
|
|
573
573
|
|
|
574
574
|
```bash
|
|
575
|
-
dotagents about # dotagents-cli <version>, then duho,
|
|
575
|
+
dotagents about # dotagents-cli <version>, then duho, pathapi, ...
|
|
576
576
|
dotagents about --json # the same, plus where it runs from and the Python
|
|
577
577
|
```
|
|
578
578
|
|
|
579
579
|
One `<distribution> <version>` per line, the CLI first. From a built `.pyz` the
|
|
580
580
|
list is exactly what `build-pyz` vendored (it records the names and versions in
|
|
581
581
|
`dotagents/_bundle.json` before stripping the `dist-info` dirs the zipapp would
|
|
582
|
-
otherwise carry, so `--extras uri
|
|
583
|
-
|
|
584
|
-
`
|
|
585
|
-
set, such as a client the `sftp` or `s3` extra pulls in
|
|
582
|
+
otherwise carry, so `--extras uri` shows up here as `pathapi-uri` and `netimps`).
|
|
583
|
+
From a plain install it is whichever of a fixed set is installed: `duho`, `pathapi`,
|
|
584
|
+
`pathapi-uri`, `netimps`, `sftppath`, `objpath` and `repopath`. A package outside
|
|
585
|
+
that set, such as a client the `sftp` or `s3` extra pulls in (`paramiko`, `boto3`),
|
|
586
|
+
is not listed.
|
|
586
587
|
|
|
587
588
|
## build-pyz
|
|
588
589
|
|
|
589
590
|
```bash
|
|
590
591
|
python -m dotagents build-pyz --out dist/dotagents.pyz
|
|
591
|
-
python -m dotagents build-pyz --extras uri,
|
|
592
|
+
python -m dotagents build-pyz --extras uri,repo # also vendor what those extras install
|
|
592
593
|
```
|
|
593
594
|
|
|
594
|
-
Builds a self-contained zipapp from a source checkout, with `duho` and `
|
|
595
|
-
vendored (plus the
|
|
595
|
+
Builds a self-contained zipapp from a source checkout, with `duho` and `pathapi`
|
|
596
|
+
vendored (plus what the dotagents-cli extras named by `--extras` install), so it runs with no
|
|
596
597
|
`pip install`. The repo's `tools/` never ships in it. Flags:
|
|
597
598
|
|
|
598
599
|
- `--out <path>` — where to write it (default `dist/dotagents.pyz`).
|
|
599
600
|
- `--python <shebang>` — the interpreter line embedded in it (default
|
|
600
601
|
`/usr/bin/env python3`).
|
|
601
|
-
- `--duho-version`, `--
|
|
602
|
-
floors the package declares).
|
|
603
|
-
|
|
602
|
+
- `--duho-version`, `--pathapi-version` — the versions vendored (defaults: the
|
|
603
|
+
floors the package declares). `--pathlib-next-version` is the old name of the
|
|
604
|
+
second.
|
|
605
|
+
- `--extras <a,b>` — dotagents-cli extras to vendor too (`uri`, `http`, `s3`, `repo`),
|
|
606
|
+
each distribution they install at its floor,
|
|
604
607
|
so the `.pyz` can read those overlay sources; none by default. Everything is
|
|
605
608
|
vendored as pure-Python wheels resolved for Python 3.9, so the file does not
|
|
606
609
|
depend on the machine that built it; `sftp` needs native modules and fails the
|
|
@@ -5,7 +5,9 @@ pip install dotagents-cli # the `dotagents` command and `import dot
|
|
|
5
5
|
pip install "dotagents-cli[uri]" # + remote overlay sources beyond git and http(s) registries
|
|
6
6
|
```
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
`uri` installs `pathapi-uri`: `file:`, `http(s):`, `dav:`, `ftp:`, `zip:` and `tar:` on
|
|
9
|
+
the standard library. `sftp`, `s3` and `repo` add `sftp:`, `s3:` and `github:` /
|
|
10
|
+
`gitlab:` / `repo:` to it; `http` installs the same as `uri`. With no
|
|
9
11
|
`pip` at all, use the [downloadable `dotagents.pyz`](#downloadable-dotagentspyz).
|
|
10
12
|
|
|
11
13
|
`dotagents init` then lays down the neutral **base config**. Opinionated content is
|
|
@@ -49,7 +51,8 @@ dotagents init --force # replace AGENTS.md's content wholesale
|
|
|
49
51
|
|
|
50
52
|
`--from <source>` selects another *base*: a base overlay directory, a dotagents
|
|
51
53
|
checkout (its `src/dotagents/_overlay`), a `file:`, `http(s):`, `zip:`, `sftp:` or `s3:`
|
|
52
|
-
URI (`pip install "dotagents-cli[uri]"` for all but `file
|
|
54
|
+
URI (`pip install "dotagents-cli[uri]"` for all but `file:`, plus `[sftp]` or `[s3]`
|
|
55
|
+
for those schemes), or a git repository
|
|
53
56
|
(`repo[@ref][#path]`). A remote one is fetched into `<user store>/.cache/overlays/`.
|
|
54
57
|
The bundled base ships inside the package, so `--from` is only for a base of your own.
|
|
55
58
|
`init` records it in
|
|
@@ -58,7 +61,7 @@ The bundled base ships inside the package, so `--from` is only for a base of you
|
|
|
58
61
|
|
|
59
62
|
## Downloadable `dotagents.pyz`
|
|
60
63
|
|
|
61
|
-
A self-contained zipapp with `duho`, `
|
|
64
|
+
A self-contained zipapp with `duho`, `pathapi` and `tomli` bundled in as
|
|
62
65
|
pure-Python wheels (plus whatever `build-pyz --extras` added), so it needs no
|
|
63
66
|
`pip install` and runs on any OS with Python 3.9+. Each release attaches one:
|
|
64
67
|
<https://github.com/jose-pr/dotagents/releases/latest/download/dotagents.pyz>.
|
|
@@ -124,9 +124,10 @@ in what the path names:
|
|
|
124
124
|
`…/dotagents.git@repo#overlays/net` is the `net` overlay itself. Given as `--repo`,
|
|
125
125
|
that form would list `net`'s own subdirectories as overlays.
|
|
126
126
|
|
|
127
|
-
A `scheme://` location that is not git is a **
|
|
128
|
-
extra (`pip install 'dotagents-cli[uri]'`;
|
|
129
|
-
|
|
127
|
+
A `scheme://` location that is not git is a **uripath path** (pathapi's URI layer, the
|
|
128
|
+
`pathapi-uri` distribution). With the `uri` extra (`pip install 'dotagents-cli[uri]'`;
|
|
129
|
+
`[sftp]`, `[s3]` and `[repo]` add `sftp:`, `s3:` and `github:` / `gitlab:` / `repo:`)
|
|
130
|
+
any scheme uripath speaks works like a local path: an `http(s)://`
|
|
130
131
|
directory listing, an `sftp`, `s3`, `dav` or `github` tree is a directory of overlays
|
|
131
132
|
as a repo or one overlay as a source, a file is a registry; an archive is a tree too —
|
|
132
133
|
`zip:<archive-uri>!/<inner path>` (`tar:`, or `archive:` to auto-detect), the archive
|
|
@@ -135,7 +136,7 @@ materialized into `<user store>/.cache/overlays/uri/`, synced once per run, and
|
|
|
135
136
|
from there; `file://` is a local path, no copy. Without the extra, an `http(s)://`
|
|
136
137
|
location can still be a registry file (fetched with the standard library), and
|
|
137
138
|
anything else says which extra it needs. The `.pyz` vendors none of this unless built
|
|
138
|
-
with `build-pyz --extras uri
|
|
139
|
+
with `build-pyz --extras uri`.
|
|
139
140
|
|
|
140
141
|
A source written as a **relative path** (`./python`, `../shared/net`, `overlays/rust`)
|
|
141
142
|
is relative to the registry it is in: the registry file's directory for a local file,
|
|
@@ -5,7 +5,7 @@ Thin front over ``dotagents.cli.main()``, kept at this filename so existing
|
|
|
5
5
|
muscle-memory/docs pointing at ``python install.py`` still work.
|
|
6
6
|
|
|
7
7
|
Self-bootstrapping, inside a virtual environment: the CLI needs the
|
|
8
|
-
``dotagents`` package and its ``duho``/``
|
|
8
|
+
``dotagents`` package and its ``duho``/``pathapi`` dependencies
|
|
9
9
|
importable. If they aren't -- e.g. a fresh venv with nothing installed yet --
|
|
10
10
|
this shim installs this checkout **into the interpreter that is running it**
|
|
11
11
|
(``sys.executable -m pip install -e .``) and retries, exactly once. When
|
|
@@ -49,7 +49,7 @@ def _import_main():
|
|
|
49
49
|
"""Return ``dotagents.cli.main`` if importable, else None.
|
|
50
50
|
|
|
51
51
|
The ``src/`` fallback lets an un-pip-installed checkout resolve its
|
|
52
|
-
``src/`` layout directly, provided ``duho``/``
|
|
52
|
+
``src/`` layout directly, provided ``duho``/``pathapi`` are importable
|
|
53
53
|
some other way. A plain editable install makes all three importable without
|
|
54
54
|
the fallback.
|
|
55
55
|
"""
|
|
@@ -35,20 +35,27 @@ classifiers = [
|
|
|
35
35
|
# `build-pyz` vendors the floor of each of these (src/dotagents/cli/build_pyz.py);
|
|
36
36
|
# raise a floor and move its pin there in the same change.
|
|
37
37
|
dependencies = [
|
|
38
|
-
"duho>=0.
|
|
39
|
-
"
|
|
38
|
+
"duho>=0.7.5,<0.8",
|
|
39
|
+
"pathapi>=0.1.0,<0.2",
|
|
40
40
|
# overlay.toml manifests and TOML registries; tomllib is stdlib from 3.11.
|
|
41
41
|
'tomli>=1.1.0; python_version < "3.11"',
|
|
42
42
|
]
|
|
43
43
|
|
|
44
|
+
# Overlay sources at a URI. `pathapi-uri` (import name `uripath`) gives the
|
|
45
|
+
# file:, http(s):, dav:, ftp:, zip: and tar: schemes on the standard library;
|
|
46
|
+
# the other distributions add their schemes to it. `build-pyz --extras` vendors
|
|
47
|
+
# the floor of each (EXTRA_REQUIREMENTS in src/dotagents/cli/build_pyz.py).
|
|
44
48
|
[project.optional-dependencies]
|
|
45
|
-
uri = ["
|
|
46
|
-
http
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
uri = ["pathapi-uri>=0.1.0,<0.2"]
|
|
50
|
+
# http(s) is part of `uri` now; kept so `dotagents-cli[http]` still installs.
|
|
51
|
+
http = ["pathapi-uri>=0.1.0,<0.2"]
|
|
52
|
+
sftp = ["pathapi-uri>=0.1.0,<0.2", "sftppath[paramiko]>=0.1.0,<0.2"]
|
|
53
|
+
s3 = ["pathapi-uri>=0.1.0,<0.2", "objpath[s3]>=0.1.0,<0.2"]
|
|
54
|
+
# github:, gitlab: and repo: (a repository's tree at a ref).
|
|
55
|
+
repo = ["pathapi-uri>=0.1.0,<0.2", "repopath[uri]>=0.1.0,<0.2"]
|
|
49
56
|
# YAML overlay-repo registries (dotagents.yaml / *.yml).
|
|
50
57
|
yaml = ["pyyaml"]
|
|
51
|
-
dev = ["build", "hatchling>=1.27", "pytest", "pyyaml", "
|
|
58
|
+
dev = ["build", "hatchling>=1.27", "pytest", "pyyaml", "pathapi-uri>=0.1.0,<0.2"]
|
|
52
59
|
docs = [
|
|
53
60
|
"mkdocs>=1.5",
|
|
54
61
|
"mkdocs-material>=9.5",
|
|
@@ -42,7 +42,7 @@ and an error saying a command is required, and exits 2.
|
|
|
42
42
|
| `launch [AGENT] [-g] [--command PROG] [--no-context] [--inline] [--write-agent] [--dry-run] [-- ARGS...]` | Run the agent's CLI with the env applied and the context handed over; the exit code is the harness's (`128+N` on signal N). |
|
|
43
43
|
| `findings add\|list\|show\|done\|reopen\|remove\|index\|path [-g] [--dir D]` | The findings queue at `<store>/findings/` (`--dir` overrides): one markdown file per finding, `done` moves it to `processed/` with a required resolution, `INDEX.md` regenerated on every change. The frontmatter is valid YAML (a value is double-quoted when it must be); `index --requote` fixes values written bare in existing files, touching nothing else. |
|
|
44
44
|
| `about [--json]` | `dotagents-cli <version>`, then `<distribution> <version>` per bundled (`.pyz`) or installed package. |
|
|
45
|
-
| `build-pyz [--out P] [--python SHEBANG] [--duho-version V] [--
|
|
45
|
+
| `build-pyz [--out P] [--python SHEBANG] [--duho-version V] [--pathapi-version V] [--extras a,b]` | Build a zipapp from a source checkout; errors elsewhere. |
|
|
46
46
|
|
|
47
47
|
**Every command but `env` is also an MCP tool.** With `DOTAGENTS_MCP=stdio` in its
|
|
48
48
|
environment, `dotagents` serves the command set — built-in, bundled and discovered —
|
|
@@ -74,7 +74,11 @@ are skipped.
|
|
|
74
74
|
## `dotagents.cli`
|
|
75
75
|
|
|
76
76
|
- `main(argv=None) -> int` — the entry point (`dotagents` console script,
|
|
77
|
-
`python -m dotagents`, `install.py`).
|
|
77
|
+
`python -m dotagents`, `install.py`). It always returns the status and never
|
|
78
|
+
raises `SystemExit`: a `SystemExit` raised below it (a message, `--help`, a usage
|
|
79
|
+
error) comes back as its status, the message going to standard error. Ctrl-C
|
|
80
|
+
returns 130 and a closed pipe on standard output returns 1, both without a
|
|
81
|
+
traceback.
|
|
78
82
|
- `class Dotagents(LoggingArgs, Cli)` — the umbrella; field `cmdspath: list[str]`.
|
|
79
83
|
- `CMDS_PATH_ENV = "AGENTS_CMDS_PATH"`.
|
|
80
84
|
- Re-exported for command modules: `DotAgentsArgs`, `_write_stdout` (see below).
|
|
@@ -142,7 +146,7 @@ The package's own data; library code, importing nothing from `dotagents.cli`.
|
|
|
142
146
|
absolute POSIX path of `<dest>/AGENTS.md`.
|
|
143
147
|
- `pyz_archive() -> str | None` — the `.pyz` this dotagents is imported from (the
|
|
144
148
|
ancestor of the module's `__file__` that is a file), or `None` for a plain
|
|
145
|
-
install. The archive also holds the vendored duho and
|
|
149
|
+
install. The archive also holds the vendored duho and pathapi; `env`
|
|
146
150
|
exports it as `AGENTS_PYLIB`.
|
|
147
151
|
|
|
148
152
|
## Commands — `dotagents.cli.init`, `dotagents.cli.overlays`, `dotagents.cli.context`, `dotagents.cli.env`, `dotagents.cli.path`, `dotagents.cli.about`, `dotagents.cli.build_pyz`
|
|
@@ -163,11 +167,16 @@ returns the exit code.
|
|
|
163
167
|
`--diff --format export`, a `PATH` that is the caller's with entries in front is
|
|
164
168
|
written as `export PATH='<prefix>'"${PATH:+:$PATH}"`.
|
|
165
169
|
- `about`: `DISTRIBUTION = "dotagents-cli"`, `BUNDLE_FILE = "_bundle.json"` (written
|
|
166
|
-
by `build-pyz` into the package), `RUNTIME_PACKAGES = ("duho", "
|
|
167
|
-
"
|
|
170
|
+
by `build-pyz` into the package), `RUNTIME_PACKAGES = ("duho", "pathapi",
|
|
171
|
+
"pathapi-uri", "netimps", "sftppath", "objpath", "repopath")` (the only packages a
|
|
172
|
+
plain install reports);
|
|
168
173
|
`bundle_manifest() -> Optional[dict]`, `installed_packages() -> dict[str, str]`,
|
|
169
174
|
`packages() -> tuple[dict[str, str], Optional[dict]]` (the bundle's packages, else
|
|
170
175
|
the installed ones; the CLI itself in neither).
|
|
176
|
+
- `build_pyz`: `EXTRA_REQUIREMENTS` — `{extra: (requirement, ...)}`, what each
|
|
177
|
+
dotagents-cli extra installs (`uri`, `http`, `sftp`, `s3`, `repo`), kept equal to
|
|
178
|
+
`pyproject.toml`; `--extras` vendors each requirement at its floor and refuses a
|
|
179
|
+
name not in it.
|
|
171
180
|
|
|
172
181
|
## `dotagents._scope`
|
|
173
182
|
|
|
@@ -314,7 +323,8 @@ a directory of overlays or a registry file (default: the root); for a **source**
|
|
|
314
323
|
- `parse_spec(text) -> Spec` — `ValueError` when empty; `SourceError` when a git
|
|
315
324
|
location or ref starts with `-`.
|
|
316
325
|
- `redact(text) -> str` — URL userinfo removed, query values masked.
|
|
317
|
-
- `uri_path_class()` — `
|
|
326
|
+
- `uri_path_class()` — `uripath.URIPath` (from `pathapi-uri`), or `None` without the
|
|
327
|
+
`uri` extra.
|
|
318
328
|
- `url_scheme(location) -> str` — the lower-cased scheme.
|
|
319
329
|
- `GIT_SSL_REVOKE_KEY = "git_ssl_revoke"`, `GIT_SSL_REVOKE_VALUES = ("best-effort",
|
|
320
330
|
"true", "false")`, `GIT_SSL_REVOKE_DEFAULT = "best-effort"`;
|
|
@@ -379,7 +389,7 @@ proxy model.
|
|
|
379
389
|
`scope.overlays` (a value pinned to the user store's copy is re-pointed when a
|
|
380
390
|
project copy shadows it). `AGENTS_PYLIB` (`_env.PYLIB_VAR`): the `.pyz` when
|
|
381
391
|
dotagents runs from one (`_resources.pyz_archive()`), else not set — where its
|
|
382
|
-
own libraries (duho,
|
|
392
|
+
own libraries (duho, pathapi) import from by zipimport for an overlay
|
|
383
393
|
built on them. Never added to `PYTHONPATH`: a consumer appends it to
|
|
384
394
|
`sys.path` when its import fails.
|
|
385
395
|
- `PATH`: every level's `bin` (contract A, not project-root, missing dirs included)
|
|
@@ -697,7 +707,7 @@ Read:
|
|
|
697
707
|
- `AGENTS_HARNESS` — the running harness (registry name or harness id), for
|
|
698
708
|
identity. `AGENTS_PYTHON` — the interpreter for `env.py`. `AGENTS_PYTHONPATH` —
|
|
699
709
|
the overlay/store `lib` dirs `env` put on `PYTHONPATH`, highest precedence first.
|
|
700
|
-
`AGENTS_PYLIB` — the `.pyz` dotagents runs from (duho and
|
|
710
|
+
`AGENTS_PYLIB` — the `.pyz` dotagents runs from (duho and pathapi import
|
|
701
711
|
from it), unset for an installed dotagents.
|
|
702
712
|
- Harness config dirs: `CLAUDE_CONFIG_DIR`, `CODEX_HOME`, `PI_CODING_AGENT_DIR`.
|
|
703
713
|
Harness markers: `CLAUDECODE`, `CLAUDE_CODE_ENTRYPOINT`, `GEMINI_CLI`,
|
|
@@ -723,11 +733,11 @@ Set for an overlay's `setup.py`: `AGENTS_HOME` (user store), `AGENTS_SCOPE_ROOT`
|
|
|
723
733
|
|
|
724
734
|
- **Python 3.9 floor.** Runtime-evaluated annotations need `from __future__ import
|
|
725
735
|
annotations` for `X | Y`; `Path.write_text(newline=)` is 3.10+ (use
|
|
726
|
-
`_fs.write_text_lf`).
|
|
736
|
+
`_fs.write_text_lf`).
|
|
727
737
|
- **Inside a `.pyz`** `Path(__file__)` is not a real file: package data is reached
|
|
728
738
|
through `_resources._package_data_dir(name)` (extracted once to a per-process
|
|
729
|
-
scratch dir removed at exit)
|
|
730
|
-
|
|
739
|
+
scratch dir removed at exit); `duho` reads the command modules' flags and help
|
|
740
|
+
through the zip importer.
|
|
731
741
|
- **Writes are LF-only.** Use `_fs.write_text_lf`, never `Path.write_text`.
|
|
732
742
|
- **`env` output is sensitive**: it prints resolved values. Nothing in the package
|
|
733
743
|
logs a value, only names.
|
|
@@ -61,7 +61,7 @@ The identity/proxy model is wired into the output around the file chain:
|
|
|
61
61
|
the same name ``dotagents context`` expands as a placeholder), so an env
|
|
62
62
|
file can reference an overlay's install dir by name. ``AGENTS_PYLIB``
|
|
63
63
|
(:data:`PYLIB_VAR`) names the ``.pyz`` when dotagents runs from one --
|
|
64
|
-
where its own libraries (duho,
|
|
64
|
+
where its own libraries (duho, pathapi) import from for an overlay
|
|
65
65
|
built on them; never put on ``PYTHONPATH``.
|
|
66
66
|
* **Proxy** is normalized AFTER the file chain: ``AGENTS_PROXY`` is seeded if
|
|
67
67
|
unset (from ``AGENTS_WEBFETCH_PROXY_URL`` else the global
|
|
@@ -1055,7 +1055,7 @@ def get_environment(
|
|
|
1055
1055
|
# `sys.executable` is '' or None under an embedding host: then nothing is
|
|
1056
1056
|
# exported rather than an empty command name.
|
|
1057
1057
|
_seed("AGENTS_PYTHON", sys.executable)
|
|
1058
|
-
# --- AGENTS_PYLIB --- where dotagents' own libraries (duho,
|
|
1058
|
+
# --- AGENTS_PYLIB --- where dotagents' own libraries (duho, pathapi)
|
|
1059
1059
|
# import from for an overlay that builds on them. Set only when dotagents
|
|
1060
1060
|
# runs from a .pyz: the archive, importable by zipimport. An installed
|
|
1061
1061
|
# dotagents has them in AGENTS_PYTHON's site-packages already. Never put on
|
|
@@ -26,7 +26,7 @@ _scratch: "Path | None" = None
|
|
|
26
26
|
|
|
27
27
|
def _scratch_dir() -> Path:
|
|
28
28
|
"""The ONE per-process temp directory for anything extracted out of a
|
|
29
|
-
zipapp (package data
|
|
29
|
+
zipapp (package data) and for `launch`'s
|
|
30
30
|
context file, created lazily on first use and removed at interpreter exit."""
|
|
31
31
|
global _scratch
|
|
32
32
|
if _scratch is None:
|
|
@@ -42,7 +42,7 @@ def pyz_archive() -> "str | None":
|
|
|
42
42
|
install. Inside a zipapp a module's ``__file__`` is a path INTO the
|
|
43
43
|
archive (``.../dotagents.pyz/dotagents/_resources.py``), so the archive
|
|
44
44
|
is the ancestor that is a file. It also holds the vendored runtime
|
|
45
|
-
dependencies (duho,
|
|
45
|
+
dependencies (duho, pathapi), importable from it by zipimport."""
|
|
46
46
|
for parent in Path(__file__).parents:
|
|
47
47
|
if parent.is_file():
|
|
48
48
|
return str(parent)
|
|
@@ -8,7 +8,7 @@ Removing an overlay unpublishes only the skills **it** published (matched agains
|
|
|
8
8
|
its own ``skills/`` source), never a skill another overlay or the user placed there,
|
|
9
9
|
then sweeps any now-broken symlinks.
|
|
10
10
|
|
|
11
|
-
Pure stdlib (``os``/``shutil``) -- no ``
|
|
11
|
+
Pure stdlib (``os``/``shutil``) -- no ``pathapi`` -- so it works in a plain
|
|
12
12
|
``pip install`` and inside the ``.pyz``. Symlink-preferred with a copy fallback is
|
|
13
13
|
the contract (on Windows a directory junction is tried between the two: it
|
|
14
14
|
needs no privilege and, like a symlink, is always current); ``--copy`` forces
|
|
@@ -26,9 +26,10 @@ directory (of overlays) or a registry file, the checkout root when absent;
|
|
|
26
26
|
for a **source** it is the overlay's root directory, and when absent *the
|
|
27
27
|
repository root is the overlay*.
|
|
28
28
|
|
|
29
|
-
A ``scheme://`` location that is not git is a **
|
|
30
|
-
the ``uri`` extra installed (``dotagents-cli[uri]``;
|
|
31
|
-
``[s3]`` add the
|
|
29
|
+
A ``scheme://`` location that is not git is a **uripath** path (pathapi's
|
|
30
|
+
URI layer). With the ``uri`` extra installed (``dotagents-cli[uri]``;
|
|
31
|
+
``[sftp]``, ``[s3]`` and ``[repo]`` add the ``sftp:``, ``s3:`` and
|
|
32
|
+
``github:`` / ``gitlab:`` / ``repo:`` schemes) any scheme uripath speaks works
|
|
32
33
|
the way a local path does: an ``http(s)://`` directory listing, an ``sftp``,
|
|
33
34
|
``s3``, ``dav`` or ``github`` tree is a directory of overlays (as a repo) or
|
|
34
35
|
one overlay (as a source), a file is a registry; so is an archive --
|
|
@@ -188,14 +189,14 @@ def parse_spec(text: str) -> Spec:
|
|
|
188
189
|
# --------------------------------------------------------------------------
|
|
189
190
|
|
|
190
191
|
def uri_path_class() -> "Any":
|
|
191
|
-
"""``
|
|
192
|
-
``None`` -- the switch between "any scheme
|
|
193
|
-
standard-library http(s) registry fetch."""
|
|
192
|
+
"""``uripath.URIPath`` when the ``uri`` extra (``pathapi-uri``) is
|
|
193
|
+
installed, else ``None`` -- the switch between "any scheme uripath speaks"
|
|
194
|
+
and the standard-library http(s) registry fetch."""
|
|
194
195
|
try:
|
|
195
|
-
from
|
|
196
|
+
from uripath import URIPath
|
|
196
197
|
except ImportError:
|
|
197
198
|
return None
|
|
198
|
-
return
|
|
199
|
+
return URIPath
|
|
199
200
|
|
|
200
201
|
|
|
201
202
|
def _local_from_file_url(url: str) -> Path:
|
|
@@ -261,7 +262,7 @@ class SourceCache(object):
|
|
|
261
262
|
location AND ref (two registry entries naming the same repository at
|
|
262
263
|
different refs -- ``@main`` for one overlay, ``@dev`` for another -- must
|
|
263
264
|
each see their own tree, since the commands resolve every source before
|
|
264
|
-
copying any), and materializations of
|
|
265
|
+
copying any), and materializations of uripath paths under ``uri/``
|
|
265
266
|
(a remote directory synced down, a remote file copied), each refreshed
|
|
266
267
|
once per process."""
|
|
267
268
|
|
|
@@ -271,7 +272,7 @@ class SourceCache(object):
|
|
|
271
272
|
self.ssl_revoke = ssl_revoke # git's http.schannelCheckRevoke (GIT_SSL_REVOKE_KEY)
|
|
272
273
|
self._fresh: "set[str]" = set() # locations fetched during this process
|
|
273
274
|
|
|
274
|
-
# ---
|
|
275
|
+
# --- uripath paths ---------------------------------------------------
|
|
275
276
|
|
|
276
277
|
def materialize(self, spec: Spec) -> Path:
|
|
277
278
|
"""The local path a ``url`` spec resolves to: the path itself for
|
|
@@ -288,17 +289,17 @@ class SourceCache(object):
|
|
|
288
289
|
if not target.exists():
|
|
289
290
|
raise SourceError("error: overlay source does not exist: %s" % target)
|
|
290
291
|
return target
|
|
291
|
-
|
|
292
|
-
if
|
|
292
|
+
URIPath = uri_path_class()
|
|
293
|
+
if URIPath is None:
|
|
293
294
|
raise SourceError(
|
|
294
|
-
"error: %s: a %s:// source needs the
|
|
295
|
-
"(pip install 'dotagents-cli[uri]', or [
|
|
296
|
-
"
|
|
295
|
+
"error: %s: a %s:// source needs the uri extra "
|
|
296
|
+
"(pip install 'dotagents-cli[uri]', or [sftp] / [s3] / [repo] for those "
|
|
297
|
+
"schemes)" % (redact(spec.location), url_scheme(spec.location))
|
|
297
298
|
)
|
|
298
|
-
from
|
|
299
|
-
from
|
|
299
|
+
from pathapi import LocalPath
|
|
300
|
+
from pathapi.sync import PathSyncer
|
|
300
301
|
|
|
301
|
-
remote =
|
|
302
|
+
remote = URIPath(spec.location)
|
|
302
303
|
if spec.path:
|
|
303
304
|
remote = remote / spec.path
|
|
304
305
|
shown = redact(spec.display())
|