refactor: make tangle-api leaf via runtime model composition#10
Merged
Volv-G merged 2 commits intoJul 3, 2026
Merged
Conversation
Assisted-By: devx/9c4ad24f-24d3-4eb9-8747-dbf53e3221df
ea72cd5 to
1ab260d
Compare
Assisted-By: devx/9c4ad24f-24d3-4eb9-8747-dbf53e3221df
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Make
tangle-apia leaf package while keeping publictangle-cliinstalls fully capable by default.Key changes:
tangle-cli -> tangle-api==0.0.1a3, sopip install tangle-cliincludes checked-in static API bindings.tangle-cli[native]as a compatibility/no-op install alias for older instructions.tangle-api -> tangle-clidependency;tangle-apiremains a leaf generated/static API package.tangle_api.generated.*from the checked-in OpenAPI snapshot as base generated models.tangle_cli.models.TangleApiClientcan use CLI-composed models whiletangle-apiremains independent.tangle-cli.Design
tangle_api.generated.modelsnow provides base generated API model classes only. It does not importtangle_cliand no longer bakes CLI-specific mixins into generated code.tangle_cli.modelscomposes the CLI public model namespace at import time using the existingMODEL_EXTENSIONSmapping. This preserves imports such as:while keeping generated imports such as:
as the unextended base generated model.
Generated operation methods now resolve return model classes through an overridable hook. The default lookup uses base
tangle_api.generated.models;TangleApiClientoverrides it to usetangle_cli.modelswhere CLI extension behavior is expected.Packaging and custom API/codegen path
The default public install is now the fully capable path:
That install includes the matching official
tangle-apipackage. Thenativeextra remains available as a compatibility alias, but it does not add another dependency becausetangle-apiis already part of the default install.Custom API/codegen users can still run codegen from the fully capable install; generation itself does not require removing official
tangle-api.Supported non-first-class custom paths:
src/tangle_api/generatedand run from that project so localsrc/tangle_apishadows site-packages.tangle-apiwith a compatible version for this release, e.g.0.0.1a3+yourorgfor thetangle-api==0.0.1a3dependency, via private index,--find-links, or uv source configuration.--no-depsinstalls onlytangle-cliand skips all dependencies; that environment must manually provide every required runtime dependency plus its generated/customtangle_apipackage.Codegen
Regenerated with:
This reads:
and writes:
Assisted-By: devx/9c4ad24f-24d3-4eb9-8747-dbf53e3221df