Skip to main content

ex-minimal-adapter-py

ex-minimal-project-py 的 adapter 擴展。由專案以路徑來源([tool.uv.sources] 的 editable path)掛上:Python 的 import 走發布名對應的 import 套件名,帶連字號的目錄無法直接 import;同時保持可發布形態——中繼欄位、參數宣告與授權都隨套件出貨,版號是 1.0.0 正式版。

適配以 SDK 層實作,只用 AdapterContext 的公開介面。emit 的責任鏈固定四步:

  1. 算落點表——渲染要靠它解析引用,因此必須在渲染之前完成。
  2. 回報不支援的 kind——逐一列進報告,不靜默丟棄。
  3. 渲染並產出節點——平台缺某機制時記 degrade 降級。
  4. 產出被引用的資源。

本適配示範的平台只有提示詞單檔與參考資料:支援 skill、rule、instruction,不支援 agent、hook、mcp、permission。適配綁語言——同一個平台要服務另兩個生態的專案時,各自以該語言的 SDK 實作一份。

在本專案的接法

promptex.config.py 的目標清單寫成 targets=[claude(), ex_minimal_adapter()],claude 是內建適配、本擴展是第三方適配,同一份源碼因此投影出兩套平台原生產物。跑 uv run promptex build --install . 後產物落在 .ex-minimal-adapter-py/prompts/,安裝報告會列出一項降級:範例規則宣告了適用範圍,而本平台無範圍載入機制,改為常駐並在內文標註適用範圍。

參數宣告

參數宣告(標準 JSON Schema)住import 套件目錄裡的 promptex.config.schema.json,由 __init__.py 自己讀進來,隨中介表示交給讀取端;promptex config declare ex-minimal-adapter-py 讀的是同一份檔案。

發布

發布走專案的發布流程(Trusted Publishing),不在套件目錄手動發布,步驟見專案根 README 的「發布」一節。

版號 1.0.0 是正式版,與 npm、crates.io 側逐字相同。安裝端照一般寫法即可:pip install ex-minimal-adapter-py(或 uv pip install ex-minimal-adapter-py),不需要 --pre。

SDK 依賴是 dependencies 的 promptex-py,指向 registry 上正式發布的版本。發布驗證、消費端安裝與實際執行用的都是同一份 SDK。

名稱刻意不帶 promptex-adapter- 前綴——那是給要被消費端搜尋到的套件用的;本擴展的定位是示範,改以 keywords 的 promptex-adapter 承載可搜尋性。

Metadata

Release files for ex-minimal-adapter-py 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ex-minimal-adapter-py 1.0.0
File Size Uploaded Provenance
ex_minimal_adapter_py-1.0.0.tar.gz 11.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ex-minimal-adapter-py 1.0.0
File Interpreter ABI Platform
ex_minimal_adapter_py-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.2 kB

Release files / ex_minimal_adapter_py-1.0.0.tar.gz

Download URL ex_minimal_adapter_py-1.0.0.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
db9251c155588c1f2bb75de6d7c163ae1dd0b2e10c9e3953205d29be181359af
BLAKE2b-256 checksum
How to use checksums
00610bf391cec7086bec8adc769f7a9e38a0cda176a6af8475e73648ab37784a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / ex_minimal_adapter_py-1.0.0-py3-none-any.whl

Download URL ex_minimal_adapter_py-1.0.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bfd4bc4f9b789afa128c3c2bd744b8395bb887c5d891cdfc666891c7b9ef4d5
BLAKE2b-256 checksum
How to use checksums
833345a4b99be3c197aebc16f695399bc10e0761d0b6de6d78cc9ddf257219c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Security for ex-minimal-adapter-py 1.0.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ex_minimal_adapter_py-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page