This release is a pre-release and may not be stable for production use.
ex-minimal-adapter-py
ex-minimal-project-py 的 adapter 擴展。由專案以路徑來源([tool.uv.sources] 的 editable path)掛上:Python 的 import 走發布名對應的 import 套件名,帶連字號的目錄無法直接 import;同時保持可發布形態——中繼欄位、參數宣告與授權都隨套件出貨,版號比照 promptex 的 alpha 原型套件。
適配以 SDK 層實作,只用 AdapterContext 的公開介面。emit 的責任鏈固定四步:
- 算落點表——渲染要靠它解析引用,因此必須在渲染之前完成。
- 回報不支援的 kind——逐一列進報告,不靜默丟棄。
- 渲染並產出節點——平台缺某機制時記 degrade 降級。
- 產出被引用的資源。
本適配示範的平台只有提示詞單檔與參考資料:支援 skill、rule、instruction,不支援 agent、hook、mcp、permission。適配綁語言——同一個平台要服務另兩個生態的專案時,各自以該語言的 SDK 實作一份。
在本專案的接法
promptex.config.py 的目標清單寫成 targets=[claude(), ex_minimal_adapter()],claude 是內建適配、本擴展是第三方適配,同一份源碼因此投影出兩套平台原生產物。跑 uv run promptex install . 後產物落在 .ex-minimal-adapter-py/prompts/,安裝報告會列出一項降級:範例規則宣告了適用範圍,而本平台無範圍載入機制,改為常駐並在內文標註適用範圍。
參數宣告
參數宣告(標準 JSON Schema)住import 套件目錄裡的 promptex.config.schema.json,由 __init__.py 自己讀進來,隨中介表示交給讀取端;promptex config declare ex-minimal-adapter-py 讀的是同一份檔案。
發布
uv build
uvx twine check dist/*
uvx twine upload dist/*
版號寫 PEP 440 的 0.0.1a1,與另兩個生態的 0.0.1-alpha.1 指同一個版本——三生態版號無法逐字相同,這是預發布版號的既有限制。安裝端要 pip install --pre ex-minimal-plugin-py:預發布版號不會被 pip 預設選中。
SDK 依賴不必換:dependencies 的 promptex-py~=0.0.0 在 registry 上對到的是 promptex-prototype 發的 0.0.0 介面樁——型別與簽名逐字複製正式版、方法本體一律拋錯。發布驗證(尤其 cargo publish 的建置)拿它編得過;裝到消費端也裝得起來,但實際執行要靠工作區覆寫指向本地的正式版 SDK,否則第一個碰到樁的呼叫就會以「promptex 介面樁」開頭的錯誤中止。
名稱刻意不帶 promptex-adapter- 前綴——那是給要被消費端搜尋到的套件用的;本擴展的定位是示範,改以 keywords 的 promptex-adapter 承載可搜尋性。
Metadata
Release files for ex-minimal-adapter-py 0.0.1a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ex_minimal_adapter_py-0.0.1a1.tar.gz | 11.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ex_minimal_adapter_py-0.0.1a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.0 kB
Release files / ex_minimal_adapter_py-0.0.1a1.tar.gz
| Download URL | ex_minimal_adapter_py-0.0.1a1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
328eeddc1d7385fd5ae41b3463a58c55f53d8f1f07d01bb8f60eddfc29fd19ac
|
|
BLAKE2b-256 checksum How to use checksums |
72212cd37932ec5f08df1ff86c050f69e18f7c8c298fa3cef3940b1f7a7afa89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / ex_minimal_adapter_py-0.0.1a1-py3-none-any.whl
| Download URL | ex_minimal_adapter_py-0.0.1a1-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27763b1a8cd919560d14f495afb88cecd34fb9c1b19a6d08d0a2416bafdc814c
|
|
BLAKE2b-256 checksum How to use checksums |
bf0a70789467a5ccd4ee05ca6d74409ce5f87dff4dad5219c40bd34ea0cd6d23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for ex-minimal-adapter-py 0.0.1a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.