ts-proxy 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.3
2
+ Name: ts-proxy
3
+ Version: 1.1.0
4
+ Summary: Serverless Sovereign MCP Proxy for Tailscale Network Management
5
+ Author: KpihX
6
+ Author-email: KpihX <kapoivha@gmail.com>
7
+ Requires-Dist: httpx>=0.28.1
8
+ Requires-Dist: pydantic>=2.10.6
9
+ Requires-Dist: rich>=13.9.4
10
+ Requires-Dist: typer>=0.15.1
11
+ Requires-Dist: pyyaml>=6.0.1
12
+ Requires-Python: >=3.12
13
+ Description-Content-Type: text/markdown
14
+
15
+ # ts-proxy
16
+
17
+ ```text
18
+ ╔╦╗┌─┐ ╔═╗╦═╗╔═╗═╗ ╦╦ ╦
19
+ ║ └─┐ ╠═╝╠╦╝║ ║╔╩╦╝╚╦╝
20
+ ╩ └─┘ ╩ ╩╚═╚═╝╩ ╚═ ╩
21
+ Sovereign Tailscale Proxy
22
+ ```
23
+
24
+ > Serverless Sovereign MCP Proxy for Tailscale Network Management (v1.2.2)
25
+ > **0% Hardcode · 100% Flexibility · Strict Alphabetical Order**
26
+
27
+ Part of the **KpihX-Labs** architecture, `ts-proxy` is a secure, ephemeral CLI tool that runs inside the `docker-host` abstraction layer. It acts as an intelligent intermediary between your AI agents (running on Ubuntu/Mac) and the global Tailscale API.
28
+
29
+ ## Core Principles
30
+
31
+ 1. **JSON-RPC 2.0 Paradigm**: All business logic commands follow a strict payload-driven model, decoupling API evolution from CLI flag stability.
32
+ 2. **Dynamic Sovereign Documentation**: Built-in introspection engine extracts rich docstrings and recursive JSON type schemas directly from the source code.
33
+ 3. **Strict Alphabetical Ordering**: To ensure maintainability and predictable CLI UX, all API methods and CLI commands are sorted alphabetically.
34
+ 4. **Zero Hardcoding**: All versions, paths, and configurations are dynamically resolved or extracted from `pyproject.toml` and `config.yaml`.
35
+ 5. **Human-In-The-Loop (HITL) Validation**: Critical operations require explicit web-based approval before execution.
36
+
37
+ ## Documentation Stack
38
+
39
+ - **[CONTRACT.md](CONTRACT.md)**: The total rigorous usage contract (Prod Facet) and sovereign development guide (Dev Facet). **Source of truth for technical specs.**
40
+ - **[AGENTS.md](AGENTS.md)**: High-level instructions and mantras for AI agents assisting in this repository.
41
+ - **[CHANGELOG.md](CHANGELOG.md)**: Evolution history and versioned releases.
42
+
43
+ ## Quick Start Visual
44
+ ```text
45
+ AI Agent ──▶ ts-proxy ──▶ [Docker: Core] ──▶ Tailscale API
46
+ │ │
47
+ │ └─▶ [HITL Approval Web UI]
48
+ └─▶ [Autosave: /tmp/ts-proxy/]
49
+ ```
50
+
51
+ ## Usage
52
+
53
+ ### Discovery & Help
54
+ Explore the capabilities and expected JSON schemas directly from your terminal:
55
+
56
+ ```bash
57
+ # List all available commands with summaries and schemas
58
+ ts-proxy do --help
59
+
60
+ # Get detailed documentation and examples for a specific command
61
+ ts-proxy do get-device --help
62
+ ```
63
+
64
+ ### Business Operations (`do` namespace)
65
+ Commands accept a single JSON payload or a path to a JSON file.
66
+
67
+ ```bash
68
+ # Simple read operation
69
+ ts-proxy do list-devices
70
+
71
+ # Targeted query with JSON payload
72
+ ts-proxy do get-device '{"device_id": "12345"}'
73
+ ```
74
+
75
+ ### Administrative Control (`admin` namespace)
76
+
77
+ ```bash
78
+ # Start a new session
79
+ ts-proxy admin login
80
+
81
+ # Check session status
82
+ ts-proxy admin status
83
+ ```
84
+
85
+ ## Architecture
86
+
87
+ - **Core**: Python 3.12 (uv)
88
+ - **Validation**: Pydantic V2 (Strict Payload Firewall)
89
+ - **Engine**: Httpx (Async), Typer (CLI Interface)
90
+ - **UI**: Glassmorphism Web HITL (Approved by KpihX)
91
+ - **Runtime**: Ephemeral Docker Container (`ts-proxy:latest`)
@@ -0,0 +1,77 @@
1
+ # ts-proxy
2
+
3
+ ```text
4
+ ╔╦╗┌─┐ ╔═╗╦═╗╔═╗═╗ ╦╦ ╦
5
+ ║ └─┐ ╠═╝╠╦╝║ ║╔╩╦╝╚╦╝
6
+ ╩ └─┘ ╩ ╩╚═╚═╝╩ ╚═ ╩
7
+ Sovereign Tailscale Proxy
8
+ ```
9
+
10
+ > Serverless Sovereign MCP Proxy for Tailscale Network Management (v1.2.2)
11
+ > **0% Hardcode · 100% Flexibility · Strict Alphabetical Order**
12
+
13
+ Part of the **KpihX-Labs** architecture, `ts-proxy` is a secure, ephemeral CLI tool that runs inside the `docker-host` abstraction layer. It acts as an intelligent intermediary between your AI agents (running on Ubuntu/Mac) and the global Tailscale API.
14
+
15
+ ## Core Principles
16
+
17
+ 1. **JSON-RPC 2.0 Paradigm**: All business logic commands follow a strict payload-driven model, decoupling API evolution from CLI flag stability.
18
+ 2. **Dynamic Sovereign Documentation**: Built-in introspection engine extracts rich docstrings and recursive JSON type schemas directly from the source code.
19
+ 3. **Strict Alphabetical Ordering**: To ensure maintainability and predictable CLI UX, all API methods and CLI commands are sorted alphabetically.
20
+ 4. **Zero Hardcoding**: All versions, paths, and configurations are dynamically resolved or extracted from `pyproject.toml` and `config.yaml`.
21
+ 5. **Human-In-The-Loop (HITL) Validation**: Critical operations require explicit web-based approval before execution.
22
+
23
+ ## Documentation Stack
24
+
25
+ - **[CONTRACT.md](CONTRACT.md)**: The total rigorous usage contract (Prod Facet) and sovereign development guide (Dev Facet). **Source of truth for technical specs.**
26
+ - **[AGENTS.md](AGENTS.md)**: High-level instructions and mantras for AI agents assisting in this repository.
27
+ - **[CHANGELOG.md](CHANGELOG.md)**: Evolution history and versioned releases.
28
+
29
+ ## Quick Start Visual
30
+ ```text
31
+ AI Agent ──▶ ts-proxy ──▶ [Docker: Core] ──▶ Tailscale API
32
+ │ │
33
+ │ └─▶ [HITL Approval Web UI]
34
+ └─▶ [Autosave: /tmp/ts-proxy/]
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ### Discovery & Help
40
+ Explore the capabilities and expected JSON schemas directly from your terminal:
41
+
42
+ ```bash
43
+ # List all available commands with summaries and schemas
44
+ ts-proxy do --help
45
+
46
+ # Get detailed documentation and examples for a specific command
47
+ ts-proxy do get-device --help
48
+ ```
49
+
50
+ ### Business Operations (`do` namespace)
51
+ Commands accept a single JSON payload or a path to a JSON file.
52
+
53
+ ```bash
54
+ # Simple read operation
55
+ ts-proxy do list-devices
56
+
57
+ # Targeted query with JSON payload
58
+ ts-proxy do get-device '{"device_id": "12345"}'
59
+ ```
60
+
61
+ ### Administrative Control (`admin` namespace)
62
+
63
+ ```bash
64
+ # Start a new session
65
+ ts-proxy admin login
66
+
67
+ # Check session status
68
+ ts-proxy admin status
69
+ ```
70
+
71
+ ## Architecture
72
+
73
+ - **Core**: Python 3.12 (uv)
74
+ - **Validation**: Pydantic V2 (Strict Payload Firewall)
75
+ - **Engine**: Httpx (Async), Typer (CLI Interface)
76
+ - **UI**: Glassmorphism Web HITL (Approved by KpihX)
77
+ - **Runtime**: Ephemeral Docker Container (`ts-proxy:latest`)
@@ -0,0 +1,35 @@
1
+ [project]
2
+ name = "ts-proxy"
3
+ version = "1.1.0"
4
+ description = "Serverless Sovereign MCP Proxy for Tailscale Network Management"
5
+ readme = "README.md"
6
+ authors = [
7
+ { name = "KpihX", email = "kapoivha@gmail.com" }
8
+ ]
9
+ requires-python = ">=3.12"
10
+ dependencies = [
11
+ "httpx>=0.28.1",
12
+ "pydantic>=2.10.6",
13
+ "rich>=13.9.4",
14
+ "typer>=0.15.1",
15
+ "pyyaml>=6.0.1",
16
+ ]
17
+
18
+ [project.scripts]
19
+ ts-proxy = "ts_proxy.cli:app"
20
+
21
+ [build-system]
22
+ requires = ["uv_build>=0.10.3,<0.11.0"]
23
+ build-backend = "uv_build"
24
+
25
+ [dependency-groups]
26
+ dev = [
27
+ "pytest>=9.0.2",
28
+ "pytest-asyncio>=0.23.5",
29
+ "pytest-cov>=7.0.0",
30
+ "ruff>=0.9.0",
31
+ ]
32
+
33
+ [tool.pytest.ini_options]
34
+ testpaths = ["tests"]
35
+ python_files = ["test_*.py"]
@@ -0,0 +1,5 @@
1
+ """
2
+ ts_proxy: Serverless Sovereign MCP Proxy for Tailscale Network Management.
3
+ """
4
+
5
+ __version__ = "0.1.0"