Skip to content

feat: publish stable typed extension contracts (#59) - #81

Merged
codeforester merged 1 commit into
mainfrom
enhancement/59-20260804-stable-typed-extension-contracts
Aug 4, 2026
Merged

codeforester merged 1 commit into
mainfrom
enhancement/59-20260804-stable-typed-extension-contracts

Conversation

@codeforester

Copy link
Copy Markdown
Contributor

Summary

Implements #59 by publishing a stable, typed extension boundary for professional Python CLI consumers.

What changed

  • Added public RuntimeLayout, profile resolver/history protocols, and generic Context[ConfigT, ApplicationStateT, ServicesT] contracts.
  • Added ParamSpec-preserving command/subcommand/decorator APIs and concrete Click subtype-preserving attach() return types.
  • Added typed AttachmentAdapter/AttachmentContract boundaries for attached Click trees.
  • Replaced command-protocol-only process-global usage with instantiable CommandSchemaRegistry and CommandCodec, while preserving module-level compatibility aliases/helpers.
  • Made native async policy explicit: async callbacks and awaitable callback results are rejected deterministically, with cleanup-safe handling.
  • Added identity-safe attachment sentinels and transactional collision rejection for reserved Click markers.
  • Added strict typed consumer example, docs, changelog, CI mypy gate, and regression coverage.

Validation

  • python -m pytest -q — 324 passed
  • mypy --strict examples/typed_consumer.py — passed
  • python -m build --outdir /private/tmp/base-cli-59-dist — sdist and wheel built successfully
  • git diff --check — passed

Closes #59

@codeforester
codeforester merged commit 996a9cb into main Aug 4, 2026
17 checks passed
@codeforester
codeforester deleted the enhancement/59-20260804-stable-typed-extension-contracts branch August 4, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish stable typed runtime, profile, and context extension contracts

1 participant