Code Craft AI RestClient - Tailscale
The codecraftai-restclient-tailscale package is a typed, aspect-driven REST client for the Tailscale public API (api.tailscale.com/api/v2/). It is built on top of codecraftai-restclient-base and consumes credentials from codecraftai-credentials (TailscaleAuthKeyCredential, TailscaleOAuthCredential). The package implements the IVPNControlPlane Protocol declared in codecraftai-foundations, so any consumer that expects a control-plane today can substitute this client transparently.
The implementation landed in Milestone M3b of the VPN/cloud-provisioning plan. See the specs/ folder for the Kiro-style requirements, design, and task documentation that drove that work.
Regenerating the OpenAPI Models
The typed model classes under source/packages/ccai/restclient/tailscale/model/ are generated from the official Tailscale OpenAPI document. They are checked in and carry a DO NOT EDIT BY HAND header. To re-sync them after an upstream API change:
PYTHONPATH=source/packages python -m ccai.restclient.tailscale._codegen.import_openapi
The importer fetches the document, validates it is OpenAPI 3.x, refreshes _spec/openapi.json plus its SHA-256 sidecar, and regenerates every model/*.py file.
Highlights (planned)
TailscaleClient(RestClientBase) exposing api groups for devices, keys, acls, tailnets, dns, and posture.
IVPNControlPlane Protocol conformance: mint_authkey, list_devices, delete_device, apply_acl.
OAuth bearer-token lifecycle with lazy mint, caching, and 401-triggered single retry.
Optional OpenAPI-driven typed model generation under model/ (re-evaluated per the codegen rule in the workspace-level PLAN-VPN-AND-CLOUD-PROVISIONING.md §9.2a — if generator output is not clean, the client is hand-authored instead).
Replaces the M3-landed codecraftai-interop/vpn/tailscale/tailscalecontrolplane.py, which becomes a re-export shim for one release cycle after this package ships.
Repository Structure
development/ - Runtime environment scripts.
repository-setup/ - Repository homing and setup scripts.
source/packages/ccai/restclient/tailscale/ - Package source code (lands in M3b).
source/testroots/testbase/ccai/tests/restclient/tailscale/ - TestBase test roots (lands in M3b).
specs/ - Requirements, design, and task documentation (Kiro-style).
userguide/ - Standards, conventions, and documentation.
Environment Setup
When working in a Codex container:
./development/setup-agent-container
For local development:
./repository-setup/rehome-repository
./development/setup-environment
Running Tests
Tests land in Milestone M3b. Once source code is in place:
source .venv/bin/activate
testbase testing run --root ./source/testroots/testbase --includes=testbase.ccai.tests
Standards and Conventions
Naming conventions: userguide/10-02-naming-conventions.rst
Code organization: userguide/10-01-code-organization.rst
Coding standards: userguide/10-00-coding-standards.rst
Additional Resources
User guide entry point: userguide/userguide.rst
Codegen decision rule: workspace PLAN-VPN-AND-CLOUD-PROVISIONING.md §9.2a
Metadata
Release files for codecraftai-restclient-tailscale 1.2.0
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 | |
|---|---|---|---|---|
| codecraftai_restclient_tailscale-1.2.0.tar.gz | 77.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codecraftai_restclient_tailscale-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 186.0 kB
Release files / codecraftai_restclient_tailscale-1.2.0.tar.gz
| Download URL | codecraftai_restclient_tailscale-1.2.0.tar.gz |
|---|---|
| Size | 77.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2de23ffa0060be53d2e856978527a3b0cbdd80d56ba91ccd4ffe7f821788e108
|
|
BLAKE2b-256 checksum How to use checksums |
afef0fb10311f76de1b5ff1fed1f90097e4001c3d58b1663fffe4e9ae77f477e
|
| 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 19, 2026.
Transparency logRelease files / codecraftai_restclient_tailscale-1.2.0-py3-none-any.whl
| Download URL | codecraftai_restclient_tailscale-1.2.0-py3-none-any.whl |
|---|---|
| Size | 108.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4af52526cc89dbb7e96178961a0181e2a1d752136f0c7fca90f4a5331480abd
|
|
BLAKE2b-256 checksum How to use checksums |
f182cdfea2052c59c75678bd11ceeae3d3fb66f7ae9de5b0ad7f4fbc52405acf
|
| 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 19, 2026.
Transparency logSecurity for codecraftai-restclient-tailscale 1.2.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.
Attestation for codecraftai_restclient_tailscale-1.2.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 19, 2026.
Transparency logA 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.