ea-plugin-cli 0.20261001.3__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.
- ea_plugin_cli-0.20261001.3/PKG-INFO +118 -0
- ea_plugin_cli-0.20261001.3/README.md +101 -0
- ea_plugin_cli-0.20261001.3/ea_plugin_cli/__init__.py +30 -0
- ea_plugin_cli-0.20261001.3/ea_plugin_cli/__main__.py +618 -0
- ea_plugin_cli-0.20261001.3/ea_plugin_cli/rules.py +255 -0
- ea_plugin_cli-0.20261001.3/ea_plugin_cli.egg-info/PKG-INFO +118 -0
- ea_plugin_cli-0.20261001.3/ea_plugin_cli.egg-info/SOURCES.txt +11 -0
- ea_plugin_cli-0.20261001.3/ea_plugin_cli.egg-info/dependency_links.txt +1 -0
- ea_plugin_cli-0.20261001.3/ea_plugin_cli.egg-info/entry_points.txt +2 -0
- ea_plugin_cli-0.20261001.3/ea_plugin_cli.egg-info/requires.txt +3 -0
- ea_plugin_cli-0.20261001.3/ea_plugin_cli.egg-info/top_level.txt +1 -0
- ea_plugin_cli-0.20261001.3/pyproject.toml +64 -0
- ea_plugin_cli-0.20261001.3/setup.cfg +4 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ea-plugin-cli
|
|
3
|
+
Version: 0.20261001.3
|
|
4
|
+
Summary: Encre Agent plugin market unified CLI โ scaffold, build, verify and publish ea-plugin-* packages
|
|
5
|
+
Author-email: Dunimd Team <dunimd@outlook.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: encre,plugin,market,cli,publish
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Requires-Dist: build>=1.0
|
|
15
|
+
Requires-Dist: twine>=5.0
|
|
16
|
+
Requires-Dist: ea-cwh>=0.1.0
|
|
17
|
+
|
|
18
|
+
<div align="center">
|
|
19
|
+
|
|
20
|
+
# ea-plugin-cli
|
|
21
|
+
|
|
22
|
+
**Encre Agent** Plugin Market Unified CLI
|
|
23
|
+
|
|
24
|
+
[PyPI](https://pypi.org/project/ea-plugin-cli/) | [Changelog](https://github.com/mf2023/ea-cwh/releases)
|
|
25
|
+
|
|
26
|
+
<a href="https://github.com/mf2023/ea-plugin-cli" target="_blank">
|
|
27
|
+
<img alt="GitHub" src="https://img.shields.io/badge/GitHub-ea--plugin--cli-181717?style=flat-square&logo=github"/>
|
|
28
|
+
</a>
|
|
29
|
+
<a href="https://pypi.org/project/ea-plugin-cli/" target="_blank">
|
|
30
|
+
<img alt="PyPI" src="https://img.shields.io/badge/PyPI-ea--plugin--cli-3775A9?style=flat-square&logo=pypi"/>
|
|
31
|
+
</a>
|
|
32
|
+
<a href="https://www.python.org/" target="_blank">
|
|
33
|
+
<img alt="Python" src="https://img.shields.io/badge/Python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white"/>
|
|
34
|
+
</a>
|
|
35
|
+
<a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">
|
|
36
|
+
<img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square"/>
|
|
37
|
+
</a>
|
|
38
|
+
|
|
39
|
+
The single toolchain that takes a plugin from scaffold to the central registry. After publishing, the registry CI merges catalog entries into the `ea-cwh` index package, which the market backend renders locally.
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<h2 align="center">๐ค What is ea-plugin-cli?</h2>
|
|
44
|
+
|
|
45
|
+
`encre-plugin` covers the full plugin lifecycle for the **Encre Agent** plugin market:
|
|
46
|
+
|
|
47
|
+
- **Scaffold** โ generate a ready-to-publish `ea-plugin-<name>` package skeleton
|
|
48
|
+
- **Build** โ enforce central-registry policy, compile a wheel, digest every artifact
|
|
49
|
+
- **Verify** โ smoke-test the wheel in an isolated venv (install, import, manifest probe)
|
|
50
|
+
- **Publish** โ upload to PyPI, then open the central-registry catalog PR automatically
|
|
51
|
+
|
|
52
|
+
### Installation
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Ready to run: python build.py cli compiles a single-file executable for the
|
|
56
|
+
current platform (build/cli/encre-plugin[.exe] โ no pip install required; it
|
|
57
|
+
shells out to a host Python found on PATH for build/venv/twine and
|
|
58
|
+
auto-installs any missing components on first use)
|
|
59
|
+
|
|
60
|
+
Or as a module: pip install ea-plugin-cli # development: pip install -e cli/
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
<h2 align="center">โญ Commands</h2>
|
|
64
|
+
|
|
65
|
+
| Command | Purpose |
|
|
66
|
+
|:------|:------|
|
|
67
|
+
| `encre-plugin init <name>` | Scaffold `ea-plugin-<name>` (pyproject + `ea.plugins` entry point + `create_plugin` factory + `ui/` directory) |
|
|
68
|
+
| `encre-plugin build [pkg_dir]` | Run central-registry policy checks โ `python -m build` (wheel + sdist) โ sha256 per artifact โ write `dist/ea-build-info.json` (draft catalog entry) |
|
|
69
|
+
| `encre-plugin vendor` | Official batch build: walk `core/ea_tools/*` (accepts the `ea-tool-`/`ea-skill-` namespaces and the `system-default` tier), build + digest each package with the same policy, stage `catalog.d/<name>.json` and wheels into `dist/vendor/` (staging only โ no upload, no PR). Invoked by `python build.py vendor` |
|
|
70
|
+
| `encre-plugin verify [pkg_dir]` | Install the wheel into a throwaway venv, import the entry-point factory and probe the manifest |
|
|
71
|
+
| `encre-plugin publish [pkg_dir]` | `twine upload` to PyPI, then open a central-registry PR: the entry lands in the registry checkout's `catalog.d/`, git branch is cut from origin/main, committed, pushed, `gh pr create` |
|
|
72
|
+
| `encre-plugin catalog regen` | Merge the registry's `catalog.d/*.json` โ validate โ write the `ea-cwh` `catalog.json` |
|
|
73
|
+
| `encre-plugin catalog check <file>` | Validate a single `catalog.json` |
|
|
74
|
+
|
|
75
|
+
<h2 align="center">๐ฆ publish โ Central Registry</h2>
|
|
76
|
+
|
|
77
|
+
- `--registry-dir <dir>` โ use an existing registry checkout; when omitted, the CLI clones `https://github.com/mf2023/ea-cwh.git` into a local cache (`%LOCALAPPDATA%` / `~/.cache` โ `encre-plugin-cli/registry`) and hard-syncs it to origin/main every run
|
|
78
|
+
- `--registry-url <git url>` โ override the default remote (point at a fork or a local bare repository to rehearse the whole flow)
|
|
79
|
+
- `--no-upload` โ skip the twine upload, run the registry-PR half only
|
|
80
|
+
- `--dry-run` โ print the files that would be uploaded and the catalog entry; no remote action
|
|
81
|
+
- The PR branch carries exactly one file (`catalog.d/<name>.json`): the branch is cut from origin/main **before** the entry is written, so no dirty worktree state can leak into the PR
|
|
82
|
+
- Transition note: `verify` needs `encre-harness` to be importable inside the probe venv; for local development either `pip install -e harness/` or use `--no-deps` plus a `PYTHONPATH` pointing at the source trees
|
|
83
|
+
|
|
84
|
+
<h2 align="center">๐ก๏ธ Central Registry Policy (enforced at build time)</h2>
|
|
85
|
+
|
|
86
|
+
| # | Rule |
|
|
87
|
+
|:------|:------|
|
|
88
|
+
| 1 | The PyPI distribution name must start with a reserved prefix โ `ea-plugin-` (community) or `ea-tool-` / `ea-skill-` (vendor namespaces) |
|
|
89
|
+
| 2 | Must declare `[project.entry-points."ea.plugins"]`; **one wheel carries exactly one plugin** |
|
|
90
|
+
| 3 | Manifest `name/version/description/author/license` must be non-empty, `manifest.version` must match the pyproject version, and `tier` must be `user` (vendor builds may also ship `system-default`) |
|
|
91
|
+
| 4 | Must declare `min_ea_version` or `engines["encre"]` |
|
|
92
|
+
| 5 | Packages that declare UI (`provides_ui` / `contributes.ui`) must ship it **pre-compiled** under `ui/` and include it as package data โ the install side never executes builds |
|
|
93
|
+
|
|
94
|
+
<h2 align="center">๐ง Environment Variables</h2>
|
|
95
|
+
|
|
96
|
+
- PyPI credentials: `TWINE_USERNAME` / `TWINE_PASSWORD` (CI uses trusted publishing and needs neither)
|
|
97
|
+
- The automatic PR requires the registry checkout to have `git remote add origin` and a logged-in `gh` CLI
|
|
98
|
+
|
|
99
|
+
<h2 align="center">๐ Community & License</h2>
|
|
100
|
+
|
|
101
|
+
- Issues and PRs are welcome!
|
|
102
|
+
- Main repository: https://github.com/mf2023/encre-agent
|
|
103
|
+
- Central registry: https://github.com/mf2023/ea-cwh
|
|
104
|
+
- CLI repository: https://github.com/mf2023/ea-plugin-cli
|
|
105
|
+
|
|
106
|
+
<div align="center">
|
|
107
|
+
|
|
108
|
+
## ๐ License
|
|
109
|
+
|
|
110
|
+
<p align="center">
|
|
111
|
+
<a href="https://www.apache.org/licenses/LICENSE-2.0">
|
|
112
|
+
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="Apache License 2.0">
|
|
113
|
+
</a>
|
|
114
|
+
</p>
|
|
115
|
+
|
|
116
|
+
This project uses the **Apache License 2.0**.
|
|
117
|
+
|
|
118
|
+
</div>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# ea-plugin-cli
|
|
4
|
+
|
|
5
|
+
**Encre Agent** Plugin Market Unified CLI
|
|
6
|
+
|
|
7
|
+
[PyPI](https://pypi.org/project/ea-plugin-cli/) | [Changelog](https://github.com/mf2023/ea-cwh/releases)
|
|
8
|
+
|
|
9
|
+
<a href="https://github.com/mf2023/ea-plugin-cli" target="_blank">
|
|
10
|
+
<img alt="GitHub" src="https://img.shields.io/badge/GitHub-ea--plugin--cli-181717?style=flat-square&logo=github"/>
|
|
11
|
+
</a>
|
|
12
|
+
<a href="https://pypi.org/project/ea-plugin-cli/" target="_blank">
|
|
13
|
+
<img alt="PyPI" src="https://img.shields.io/badge/PyPI-ea--plugin--cli-3775A9?style=flat-square&logo=pypi"/>
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://www.python.org/" target="_blank">
|
|
16
|
+
<img alt="Python" src="https://img.shields.io/badge/Python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white"/>
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">
|
|
19
|
+
<img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square"/>
|
|
20
|
+
</a>
|
|
21
|
+
|
|
22
|
+
The single toolchain that takes a plugin from scaffold to the central registry. After publishing, the registry CI merges catalog entries into the `ea-cwh` index package, which the market backend renders locally.
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<h2 align="center">๐ค What is ea-plugin-cli?</h2>
|
|
27
|
+
|
|
28
|
+
`encre-plugin` covers the full plugin lifecycle for the **Encre Agent** plugin market:
|
|
29
|
+
|
|
30
|
+
- **Scaffold** โ generate a ready-to-publish `ea-plugin-<name>` package skeleton
|
|
31
|
+
- **Build** โ enforce central-registry policy, compile a wheel, digest every artifact
|
|
32
|
+
- **Verify** โ smoke-test the wheel in an isolated venv (install, import, manifest probe)
|
|
33
|
+
- **Publish** โ upload to PyPI, then open the central-registry catalog PR automatically
|
|
34
|
+
|
|
35
|
+
### Installation
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Ready to run: python build.py cli compiles a single-file executable for the
|
|
39
|
+
current platform (build/cli/encre-plugin[.exe] โ no pip install required; it
|
|
40
|
+
shells out to a host Python found on PATH for build/venv/twine and
|
|
41
|
+
auto-installs any missing components on first use)
|
|
42
|
+
|
|
43
|
+
Or as a module: pip install ea-plugin-cli # development: pip install -e cli/
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
<h2 align="center">โญ Commands</h2>
|
|
47
|
+
|
|
48
|
+
| Command | Purpose |
|
|
49
|
+
|:------|:------|
|
|
50
|
+
| `encre-plugin init <name>` | Scaffold `ea-plugin-<name>` (pyproject + `ea.plugins` entry point + `create_plugin` factory + `ui/` directory) |
|
|
51
|
+
| `encre-plugin build [pkg_dir]` | Run central-registry policy checks โ `python -m build` (wheel + sdist) โ sha256 per artifact โ write `dist/ea-build-info.json` (draft catalog entry) |
|
|
52
|
+
| `encre-plugin vendor` | Official batch build: walk `core/ea_tools/*` (accepts the `ea-tool-`/`ea-skill-` namespaces and the `system-default` tier), build + digest each package with the same policy, stage `catalog.d/<name>.json` and wheels into `dist/vendor/` (staging only โ no upload, no PR). Invoked by `python build.py vendor` |
|
|
53
|
+
| `encre-plugin verify [pkg_dir]` | Install the wheel into a throwaway venv, import the entry-point factory and probe the manifest |
|
|
54
|
+
| `encre-plugin publish [pkg_dir]` | `twine upload` to PyPI, then open a central-registry PR: the entry lands in the registry checkout's `catalog.d/`, git branch is cut from origin/main, committed, pushed, `gh pr create` |
|
|
55
|
+
| `encre-plugin catalog regen` | Merge the registry's `catalog.d/*.json` โ validate โ write the `ea-cwh` `catalog.json` |
|
|
56
|
+
| `encre-plugin catalog check <file>` | Validate a single `catalog.json` |
|
|
57
|
+
|
|
58
|
+
<h2 align="center">๐ฆ publish โ Central Registry</h2>
|
|
59
|
+
|
|
60
|
+
- `--registry-dir <dir>` โ use an existing registry checkout; when omitted, the CLI clones `https://github.com/mf2023/ea-cwh.git` into a local cache (`%LOCALAPPDATA%` / `~/.cache` โ `encre-plugin-cli/registry`) and hard-syncs it to origin/main every run
|
|
61
|
+
- `--registry-url <git url>` โ override the default remote (point at a fork or a local bare repository to rehearse the whole flow)
|
|
62
|
+
- `--no-upload` โ skip the twine upload, run the registry-PR half only
|
|
63
|
+
- `--dry-run` โ print the files that would be uploaded and the catalog entry; no remote action
|
|
64
|
+
- The PR branch carries exactly one file (`catalog.d/<name>.json`): the branch is cut from origin/main **before** the entry is written, so no dirty worktree state can leak into the PR
|
|
65
|
+
- Transition note: `verify` needs `encre-harness` to be importable inside the probe venv; for local development either `pip install -e harness/` or use `--no-deps` plus a `PYTHONPATH` pointing at the source trees
|
|
66
|
+
|
|
67
|
+
<h2 align="center">๐ก๏ธ Central Registry Policy (enforced at build time)</h2>
|
|
68
|
+
|
|
69
|
+
| # | Rule |
|
|
70
|
+
|:------|:------|
|
|
71
|
+
| 1 | The PyPI distribution name must start with a reserved prefix โ `ea-plugin-` (community) or `ea-tool-` / `ea-skill-` (vendor namespaces) |
|
|
72
|
+
| 2 | Must declare `[project.entry-points."ea.plugins"]`; **one wheel carries exactly one plugin** |
|
|
73
|
+
| 3 | Manifest `name/version/description/author/license` must be non-empty, `manifest.version` must match the pyproject version, and `tier` must be `user` (vendor builds may also ship `system-default`) |
|
|
74
|
+
| 4 | Must declare `min_ea_version` or `engines["encre"]` |
|
|
75
|
+
| 5 | Packages that declare UI (`provides_ui` / `contributes.ui`) must ship it **pre-compiled** under `ui/` and include it as package data โ the install side never executes builds |
|
|
76
|
+
|
|
77
|
+
<h2 align="center">๐ง Environment Variables</h2>
|
|
78
|
+
|
|
79
|
+
- PyPI credentials: `TWINE_USERNAME` / `TWINE_PASSWORD` (CI uses trusted publishing and needs neither)
|
|
80
|
+
- The automatic PR requires the registry checkout to have `git remote add origin` and a logged-in `gh` CLI
|
|
81
|
+
|
|
82
|
+
<h2 align="center">๐ Community & License</h2>
|
|
83
|
+
|
|
84
|
+
- Issues and PRs are welcome!
|
|
85
|
+
- Main repository: https://github.com/mf2023/encre-agent
|
|
86
|
+
- Central registry: https://github.com/mf2023/ea-cwh
|
|
87
|
+
- CLI repository: https://github.com/mf2023/ea-plugin-cli
|
|
88
|
+
|
|
89
|
+
<div align="center">
|
|
90
|
+
|
|
91
|
+
## ๐ License
|
|
92
|
+
|
|
93
|
+
<p align="center">
|
|
94
|
+
<a href="https://www.apache.org/licenses/LICENSE-2.0">
|
|
95
|
+
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="Apache License 2.0">
|
|
96
|
+
</a>
|
|
97
|
+
</p>
|
|
98
|
+
|
|
99
|
+
This project uses the **Apache License 2.0**.
|
|
100
|
+
|
|
101
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
# Copyright ยฉ 2025-2026 Wenze Wei. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# This file is part of Encre.
|
|
6
|
+
# The Encre project belongs to the Dunimd Team.
|
|
7
|
+
#
|
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
# you may not use this file except in compliance with the License.
|
|
10
|
+
# You may obtain a copy of the License at
|
|
11
|
+
#
|
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
#
|
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
# See the License for the specific language governing permissions and
|
|
18
|
+
# limitations under the License.
|
|
19
|
+
#
|
|
20
|
+
# DISCLAIMER: Users must comply with applicable AI regulations.
|
|
21
|
+
# Non-compliance may result in service termination or legal liability.
|
|
22
|
+
|
|
23
|
+
"""ea-plugin-cli โ the Encre Agent plugin market unified toolchain.
|
|
24
|
+
|
|
25
|
+
Commands (see ``__main__``): init ยท build ยท verify ยท publish ยท catalog.
|
|
26
|
+
Distribution-name policy, manifest checks and catalog-entry construction
|
|
27
|
+
live in :mod:`ea_plugin_cli.rules` so the registry CI can import them too.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
__version__ = "0.1.0"
|