ptn 0.1.4__py3-none-any.whl → 0.3.2__py3-none-any.whl

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.
Files changed (45) hide show
  1. porterminal/__init__.py +82 -14
  2. porterminal/_version.py +34 -0
  3. porterminal/app.py +32 -4
  4. porterminal/application/ports/__init__.py +2 -0
  5. porterminal/application/ports/connection_registry_port.py +46 -0
  6. porterminal/application/services/management_service.py +2 -3
  7. porterminal/application/services/terminal_service.py +116 -28
  8. porterminal/asgi.py +8 -3
  9. porterminal/cli/args.py +103 -0
  10. porterminal/cli/display.py +1 -1
  11. porterminal/composition.py +19 -5
  12. porterminal/config.py +62 -70
  13. porterminal/container.py +3 -10
  14. porterminal/domain/__init__.py +0 -2
  15. porterminal/domain/entities/output_buffer.py +0 -4
  16. porterminal/domain/ports/__init__.py +1 -2
  17. porterminal/domain/ports/pty_port.py +0 -29
  18. porterminal/domain/ports/tab_repository.py +0 -5
  19. porterminal/infrastructure/auth.py +131 -0
  20. porterminal/infrastructure/cloudflared.py +5 -1
  21. porterminal/infrastructure/config/__init__.py +0 -2
  22. porterminal/infrastructure/config/shell_detector.py +342 -1
  23. porterminal/infrastructure/repositories/in_memory_tab.py +0 -4
  24. porterminal/infrastructure/server.py +37 -5
  25. porterminal/static/assets/app-BkHv5qu0.css +32 -0
  26. porterminal/static/assets/app-CaIGfw7i.js +72 -0
  27. porterminal/static/assets/app-D9ELFbEO.js +72 -0
  28. porterminal/static/assets/app-DF3nl_io.js +72 -0
  29. porterminal/static/assets/app-DQePboVd.css +32 -0
  30. porterminal/static/assets/app-DoBiVkTD.js +72 -0
  31. porterminal/static/assets/app-azbHOsRw.css +32 -0
  32. porterminal/static/assets/app-nMNFwMa6.css +32 -0
  33. porterminal/static/index.html +28 -25
  34. porterminal/updater.py +115 -168
  35. ptn-0.3.2.dist-info/METADATA +171 -0
  36. {ptn-0.1.4.dist-info → ptn-0.3.2.dist-info}/RECORD +39 -33
  37. porterminal/infrastructure/config/yaml_loader.py +0 -34
  38. porterminal/static/assets/app-BQiuUo6Q.css +0 -32
  39. porterminal/static/assets/app-YNN_jEhv.js +0 -71
  40. porterminal/static/manifest.json +0 -31
  41. porterminal/static/sw.js +0 -66
  42. ptn-0.1.4.dist-info/METADATA +0 -191
  43. {ptn-0.1.4.dist-info → ptn-0.3.2.dist-info}/WHEEL +0 -0
  44. {ptn-0.1.4.dist-info → ptn-0.3.2.dist-info}/entry_points.txt +0 -0
  45. {ptn-0.1.4.dist-info → ptn-0.3.2.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: ptn
3
+ Version: 0.3.2
4
+ Summary: Web-based terminal accessible from phone via Cloudflare Tunnel
5
+ Project-URL: Homepage, https://github.com/lyehe/porterminal
6
+ Project-URL: Repository, https://github.com/lyehe/porterminal
7
+ Project-URL: Documentation, https://github.com/lyehe/porterminal/tree/main/docs
8
+ Project-URL: Issues, https://github.com/lyehe/porterminal/issues
9
+ Author: Porterminal Contributors
10
+ Maintainer: Porterminal Contributors
11
+ License: AGPL-3.0-or-later
12
+ License-File: LICENSE
13
+ Keywords: cloudflare,mobile,pty,terminal,tunnel,web,websocket,xterm
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Environment :: Web Environment
16
+ Classifier: Framework :: FastAPI
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Intended Audience :: System Administrators
19
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
20
+ Classifier: Operating System :: MacOS
21
+ Classifier: Operating System :: Microsoft :: Windows
22
+ Classifier: Operating System :: POSIX :: Linux
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Topic :: Internet :: WWW/HTTP
26
+ Classifier: Topic :: System :: Shells
27
+ Classifier: Topic :: Terminals :: Terminal Emulators/X Terminals
28
+ Requires-Python: >=3.12
29
+ Requires-Dist: bcrypt>=4.0.0
30
+ Requires-Dist: fastapi>=0.104.0
31
+ Requires-Dist: pydantic>=2.0
32
+ Requires-Dist: pywinpty>=2.0.0; sys_platform == 'win32'
33
+ Requires-Dist: pyyaml>=6.0
34
+ Requires-Dist: qrcode>=7.4
35
+ Requires-Dist: rich>=13.0
36
+ Requires-Dist: uvicorn[standard]>=0.24.0
37
+ Provides-Extra: dev
38
+ Requires-Dist: watchfiles>=0.21.0; extra == 'dev'
39
+ Description-Content-Type: text/markdown
40
+
41
+ <p align="center">
42
+ <a href="https://github.com/lyehe/porterminal">
43
+ <img src="assets/banner.jpg" alt="Porterminal - Vibe Code From Anywhere" width="600">
44
+ </a>
45
+ </p>
46
+
47
+ <p align="center">
48
+ <a href="https://pypi.org/project/ptn/"><img src="https://img.shields.io/pypi/v/ptn?style=flat-square&logo=pypi&logoColor=white&label=PyPI" alt="PyPI"></a>
49
+ <a href="https://pypi.org/project/ptn/"><img src="https://img.shields.io/pypi/pyversions/ptn?style=flat-square&logo=python&logoColor=white" alt="Python"></a>
50
+ <a href="https://pypi.org/project/ptn/"><img src="https://img.shields.io/pypi/dm/ptn?style=flat-square&label=Downloads" alt="Downloads"></a>
51
+ <a href="https://github.com/lyehe/porterminal/blob/master/LICENSE"><img src="https://img.shields.io/github/license/lyehe/porterminal?style=flat-square" alt="License"></a>
52
+ <a href="https://github.com/lyehe/porterminal/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/lyehe/porterminal/ci.yml?branch=master&style=flat-square&logo=github&label=CI" alt="CI"></a>
53
+ </p>
54
+
55
+
56
+
57
+ <p align="center">
58
+ <b>1.</b> <code>uvx ptn</code><br>
59
+ <b>2.</b> Scan the QR<br>
60
+ <b>3.</b> Access your terminal from your phone<br>
61
+ </p>
62
+
63
+ <p align="center">
64
+ <img src="assets/demo.gif" alt="Porterminal demo" width="320">
65
+ </p>
66
+
67
+ ## Why
68
+
69
+ I wanted to vibe code from bed.
70
+
71
+ **ngrok** requires registration and the free tier sucks. **Cloudflare Quick Tunnel** works great but is hard to use directly on the phone. **Termius** requires complicated setup: port forwarding, firewall rules, key management... Tried **Claude Code web**, but it can't access my local hardware and environment. Also tried **Happy**, but it's too bulky and updates lag behind.
72
+
73
+ So I built something simpler: **run a command, scan a QR, start typing.**
74
+
75
+ ## Features
76
+
77
+ - **One command, instant access** - No SSH, no port forwarding, no config files. Cloudflare tunnel + QR code.
78
+ - **Actually usable on mobile** - Essential buttons and gestures for everyday terminal use.
79
+ - **Multi-tab shared sessions** - Run builds in one tab, tail logs in another. Sessions and tabs persist across reconnects.
80
+ - **Cross-platform** - Windows (PowerShell, CMD, WSL), Linux/macOS (Bash, Zsh, Fish). Auto-detects your shells.
81
+
82
+ ## Install
83
+
84
+ | Method | Install | Update |
85
+ |--------|---------|--------|
86
+ | **uvx** (no install) | `uvx ptn` | `uvx --refresh ptn` |
87
+ | **uv tool** | `uv tool install ptn` | `uv tool upgrade ptn` |
88
+ | **pipx** | `pipx install ptn` | `pipx upgrade ptn` |
89
+ | **pip** | `pip install ptn` | `pip install -U ptn` |
90
+
91
+ **One-line install (uv + ptn):**
92
+
93
+ | OS | Command |
94
+ |----|---------|
95
+ | **Windows** | `powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/lyehe/porterminal/master/install.ps1 \| iex"` |
96
+ | **macOS/Linux** | `curl -LsSf https://raw.githubusercontent.com/lyehe/porterminal/master/install.sh \| sh` |
97
+
98
+ Requires Python 3.12+ and [cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/) (auto-installed if missing).
99
+
100
+ ## Usage
101
+
102
+ ```bash
103
+ ptn # Start in current directory
104
+ ptn ~/projects/myapp # Start in specific folder
105
+ ptn --no-tunnel # Local network only
106
+ ptn -b # Run in background
107
+ ptn -p # Enable password protection
108
+ ptn -dp # Toggle default password requirement in config
109
+ ptn -v # Verbose startup logs
110
+ ptn --init # Create .ptn/ptn.yaml config
111
+ ptn -V # Show version
112
+ ptn -U # Update to latest version
113
+ ptn --check-update # Check if update available
114
+ ```
115
+
116
+ ## Configuration
117
+
118
+ Run `ptn --init` to create a starter config, or create `ptn.yaml` manually:
119
+
120
+ ```yaml
121
+ # Custom buttons (appear in toolbar)
122
+ buttons:
123
+ - label: "claude"
124
+ send:
125
+ - "claude"
126
+ - 100 # delay in ms
127
+ - "\r"
128
+ - label: "tmux"
129
+ send: "tmux\r"
130
+
131
+ # Update checker settings
132
+ update:
133
+ notify_on_startup: true # Show update notification
134
+ check_interval: 86400 # Seconds between checks (default: 24h)
135
+
136
+ # Security settings
137
+ security:
138
+ require_password: true # Always prompt for password at startup
139
+ max_auth_attempts: 5 # Max failed attempts before disconnect
140
+ ```
141
+
142
+ Config is searched in order: `$PORTERMINAL_CONFIG_PATH`, `./ptn.yaml`, `./.ptn/ptn.yaml`, `~/.ptn/ptn.yaml`.
143
+
144
+ ## Security
145
+
146
+ Use password if your screen can be exposed to others:
147
+ ```bash
148
+ ptn -p # Prompt for password this session
149
+ ptn -dp # Enable password by default (toggle)
150
+ ```
151
+
152
+ Password is per-session (never saved to disk). See [docs/security.md](docs/security.md) for details.
153
+
154
+ ## Troubleshooting
155
+
156
+ **Connection fails?** Cloudflare tunnel sometimes blocks connections. Restart the server (`Ctrl+C`, then `ptn`) to get a fresh tunnel URL.
157
+
158
+ ## Contributing
159
+
160
+ Issues and PRs welcome.
161
+
162
+ ```bash
163
+ git clone https://github.com/lyehe/porterminal
164
+ cd porterminal
165
+ uv sync
166
+ uv run ptn
167
+ ```
168
+
169
+ ## License
170
+
171
+ [AGPL-3.0](LICENSE)
@@ -1,32 +1,34 @@
1
- porterminal/__init__.py,sha256=V8uAGMquwSE-cDVDLRiwyQ1rp9VK8PFApDAUY8TWezg,10050
1
+ porterminal/__init__.py,sha256=aftLcHuDFp0nI5MF-eNyahFyx3nyGxf8SERK59-G_0Y,12604
2
2
  porterminal/__main__.py,sha256=XLo21rqmISrIZFiaHC58Trgq8E0gxH4Wb3driD4JA7c,137
3
- porterminal/app.py,sha256=C6j2DG0ZrzqDu7DjfLmamjmMMHvhp2M7_28JyKDcc-Q,13852
4
- porterminal/asgi.py,sha256=gXGCq2U4C5wJvjLa1sU946GIGfCsnex5mT3J_-u6YiY,1151
5
- porterminal/composition.py,sha256=jHZQiL51rOXLptmP_luR2cYMirAZG3DQ1vF6thVDFLc,6429
6
- porterminal/config.py,sha256=0kPTRjFrf_--w1riefJKPPuo1JcK83T-M1zcWS_8304,5759
7
- porterminal/container.py,sha256=bZ4lR6hvERMoGZvQ2y5VEE4kIiVhhcfBHzzc-xZ_xeg,1865
3
+ porterminal/_version.py,sha256=e8NqPtZ8fggRgk3GPrqZ_U_BDV8aSULw1u_Gn9NNbnk,704
4
+ porterminal/app.py,sha256=Q3w-61i6h2Atz4wirAgrT--xTH_qCp4Ig2zgnAIyJ9U,15220
5
+ porterminal/asgi.py,sha256=P76H7k03T3GYBAmjWqLaCZXV-YIou6NMhfRySO8He1A,1276
6
+ porterminal/composition.py,sha256=7j1J_5ZFx3GHNRdGzmO25FAM2DIKWvaooo4BOvTQIuk,7022
7
+ porterminal/config.py,sha256=yEylb1nhBYmVdEC4U3pRQ5PcrkMCpKMv34GV8SpTEtk,5521
8
+ porterminal/container.py,sha256=wDtppL1Xf4A6IQcP5FP-V9-hjKEDciQc4VMz5ezyv2o,1536
8
9
  porterminal/logging_setup.py,sha256=DhoN_FdJFbRawcsYy8mLRU32TCT1ZfZ2G4Q_AOKwZuA,1513
9
- porterminal/updater.py,sha256=737adYtUZKyh1czjQn8VuOaa1DO--oH4uebt2shFfqs,7175
10
+ porterminal/updater.py,sha256=iIUQzo4AW8DWoQdJnCQ9DRiSgTZRiN6XXbTYn4puPaw,6222
10
11
  porterminal/application/__init__.py,sha256=Q5gQia_11ubfMcDbzjvI6RoUU2jFJkuQrsbSuIfQCRA,55
11
- porterminal/application/ports/__init__.py,sha256=zKcSDFmPPOIP0Oxuf8O5AEMmURV7AaSVA2D8iahwU6c,149
12
+ porterminal/application/ports/__init__.py,sha256=bGZlGKTjKWWxiwNhjz47nA2K_wvFSp9dExNmo9Pikxg,240
12
13
  porterminal/application/ports/connection_port.py,sha256=kXIl-fzx3SbpU8kV1rpmgNeI22XSJMbzXGt1YcwZO8Y,926
14
+ porterminal/application/ports/connection_registry_port.py,sha256=OAZMvcETGW4IkeJ2OPQ29wTEJ7HKBLj_pVlsnGY0znk,1386
13
15
  porterminal/application/services/__init__.py,sha256=YO-iPdE_-EEV9tVnu0NcB5bwSCCSVy9CWOGBFCJyoRc,335
14
- porterminal/application/services/management_service.py,sha256=WllcHDCQuPzAKkEEyhV8afDWJ2aUw8rsBsFhbZ3DWPU,8661
16
+ porterminal/application/services/management_service.py,sha256=8S1bVL18_JiWZatWlDQmfKvyWSfReKKZnhA82rq6cMQ,8614
15
17
  porterminal/application/services/session_service.py,sha256=f1Mk-a9ug895jSsskOKY1uW3N5IcMTEutpM_d0RAmaM,8234
16
18
  porterminal/application/services/tab_service.py,sha256=0_S978dYhBW2-eaZN2wOlcZOY4V4iPt2MMNOyoZQxPs,8307
17
- porterminal/application/services/terminal_service.py,sha256=4UUlZKHGaCoI37759V0xs30ydZPemsFm9MIehiIkFX4,15670
19
+ porterminal/application/services/terminal_service.py,sha256=za8Rr-Hb7C2xzCF0HmSG7VpCk1_gvTsnChyyPyOzVPs,19818
18
20
  porterminal/cli/__init__.py,sha256=A3y-QgKrT-vdAYV-xsZjeyMkiPymZaZzYUGQ-_3cXmQ,305
19
- porterminal/cli/args.py,sha256=cWgs6GMmlNw9_vOpk1bIqt968sriXpgGvQM7s8Ti7ZA,2548
20
- porterminal/cli/display.py,sha256=wErWVPz3PmCvX5vxxaCdPb4YSeByrEj1dj0BSSmrZE0,5530
21
- porterminal/domain/__init__.py,sha256=A_EgLaAzPwETbnGx6ZeiyjVwP4EBWAweofo464PGhHI,1680
21
+ porterminal/cli/args.py,sha256=H5kIJqnn-y9fxsE6hsWN1lIWIkjQ_X7PzYl4O6_x5h0,5254
22
+ porterminal/cli/display.py,sha256=ts1Ep7chIUfuJ1C6e_Rd0zlXiVGrzpaufm6MAsqhbh8,5521
23
+ porterminal/domain/__init__.py,sha256=OIkaxSb2BThs1COAvsuyOWC-l7lWd7Dfvl1kwNVlgPg,1646
22
24
  porterminal/domain/entities/__init__.py,sha256=dIQp6T0M-Bl_DJpSOGQGBD29Rl_FDR0XfVrDL08ck50,463
23
- porterminal/domain/entities/output_buffer.py,sha256=3-tCGOUvU3U9QfOmPu9703VlyJu3bZKYbEzSPYTqwWE,2246
25
+ porterminal/domain/entities/output_buffer.py,sha256=d5ILcaxBsTLtZQEaGAgXFByQVacdsXRO9ioEAIgWqlA,2133
24
26
  porterminal/domain/entities/session.py,sha256=SzAEqbqr49QhcSW_2BqYVJst1_6yo8qs21Efh_uBJDA,2680
25
27
  porterminal/domain/entities/tab.py,sha256=OQPS_CtTx5MD8bjH23NQw0Z4RbXh8Mqew3P0_KYHYl4,2124
26
- porterminal/domain/ports/__init__.py,sha256=YoiaopwjGvKqhekp19zwZ7960WNPZ-jQ9TNUw0wgMGw,294
27
- porterminal/domain/ports/pty_port.py,sha256=mOlYB5bgMW1br6QcGJHkrmPSOCRds8o76x7bKaQrvto,1925
28
+ porterminal/domain/ports/__init__.py,sha256=ryAYtrvSanQecroEz7tPHzWN_U9icx51Fn_snDBNDiQ,264
29
+ porterminal/domain/ports/pty_port.py,sha256=HGk7kyE1j5vG5aebB2XFfrhjNX6a2g37eUUPpgPJxu0,1179
28
30
  porterminal/domain/ports/session_repository.py,sha256=Gh5c2cneboXYEuNw8Gxw06IZwpMqhN0HA7KINFFi2LQ,1611
29
- porterminal/domain/ports/tab_repository.py,sha256=OVLi4jhsBxWNiRKhX849bbv_OWhBGuBHK79Qk9bUlR8,1948
31
+ porterminal/domain/ports/tab_repository.py,sha256=_QMuTqjc9A095sDInD4fk7sjCu_v-aXXM4HzCQsOyO0,1826
30
32
  porterminal/domain/services/__init__.py,sha256=YiEokgIXvSbfieNlBfdWSPJlbBYDFrzIYc5aVpkjSeI,561
31
33
  porterminal/domain/services/environment_sanitizer.py,sha256=RslZDn8jso8bX1hG9p9NQyv1ey19u1F5xATPlq6pKVw,2014
32
34
  porterminal/domain/services/rate_limiter.py,sha256=I0cybe1PX7uYWlr7l92N3jM89yFQDRKqD5p9-lT8Mas,1724
@@ -41,17 +43,17 @@ porterminal/domain/values/tab_id.py,sha256=zKZZ1lBQUmXZ3PQlH0jejUQ_AA_SVTW-Z7jCI
41
43
  porterminal/domain/values/terminal_dimensions.py,sha256=mWtMQi40EDtwnKpQadTR5eD0VmInO-2kgbUUw2VVCZY,1334
42
44
  porterminal/domain/values/user_id.py,sha256=eskGRVL-qj4czXljF0e5imDh19pAq16faXJY0lZ73kM,581
43
45
  porterminal/infrastructure/__init__.py,sha256=rIaiEG4gyvfSixSEry0kA2uMhStQQIWv9PRlfs17qts,649
44
- porterminal/infrastructure/cloudflared.py,sha256=6vGUdFmGrxLTbopGgEdYRKJ5n0M3Ov00cuM-hEYAjSk,11506
46
+ porterminal/infrastructure/auth.py,sha256=vBXC9TJrydbQDadvYqfznhQ2YRZ2BGBseabJ-IAmUeA,3931
47
+ porterminal/infrastructure/cloudflared.py,sha256=DJfZ2_Yj0EDGF30RyeVUhWDn67x-xvVOtBso59DzfRg,11810
45
48
  porterminal/infrastructure/network.py,sha256=XnYbEXKQA8BnrLFl9b4OTTixFG1pVFxfeVuhN-XPkfU,1275
46
- porterminal/infrastructure/server.py,sha256=U_GwzUSyD96S3_M-jOj922lsgCWGvyDPev0vyd3nlGc,4463
47
- porterminal/infrastructure/config/__init__.py,sha256=9KOQsmjYn6iPS5xnp2UZnmEUqm7ZUoxQcU48CF6xPR8,205
48
- porterminal/infrastructure/config/shell_detector.py,sha256=03raUHVgKg0UG1KNrf_U3BOQ1Mbi3gGNxK_etLCIubQ,2610
49
- porterminal/infrastructure/config/yaml_loader.py,sha256=7EQhJLQymHRGwHLIsEXvIDTnfcRmMgl-ASuQaOaycnY,877
49
+ porterminal/infrastructure/server.py,sha256=n6lSZjd6m380QzvdAZAu7CbbRoTvTAL8Dp-mcMaNFmY,5803
50
+ porterminal/infrastructure/config/__init__.py,sha256=kcoM8mQYa83rkxn8TUfh0nETKynrsLmVwD9ySIfvdPQ,139
51
+ porterminal/infrastructure/config/shell_detector.py,sha256=e6QPHjg5LI9fEe2xe844k3T4mH49mxo7NMcbLBS__do,14074
50
52
  porterminal/infrastructure/registry/__init__.py,sha256=reNbIYRr1alNps7zm_oENuS6QWNKiiO-WG09LT5MLmM,157
51
53
  porterminal/infrastructure/registry/user_connection_registry.py,sha256=u9KOSijHiRITnwnOBKwXuYOKbFguh2NbxmNMxIoo8vc,3398
52
54
  porterminal/infrastructure/repositories/__init__.py,sha256=UyF9lpobXgKb9Ti6ucC6fDcC9CkMAGDThggEG-Rf-Aw,250
53
55
  porterminal/infrastructure/repositories/in_memory_session.py,sha256=yNkCuxrR8S5yTC_I_OFOYg1DlgEkxcI2DEW6aPq9ByQ,2490
54
- porterminal/infrastructure/repositories/in_memory_tab.py,sha256=J0AC1jgv63YvnuZzQTkIT6aUUC6b7zqVrXFnPSZ_sVQ,4337
56
+ porterminal/infrastructure/repositories/in_memory_tab.py,sha256=txHwO3xdRZjBzmdxCQy02conzjkq8lRWGQoKUd4J__E,4230
55
57
  porterminal/infrastructure/web/__init__.py,sha256=QZqOtxOqhuxh4AD5xzPl9CBfOscdXOoGQv4zT4rpy7Q,147
56
58
  porterminal/infrastructure/web/websocket_adapter.py,sha256=vVjIhcfWikPw-PKfSyqm3Y7PbTxNj1mstfrHIpcg6ng,2424
57
59
  porterminal/pty/__init__.py,sha256=WNniN5uYKthLMOT7nzH63pkfFCJltToika50NZGR2cA,1054
@@ -61,13 +63,17 @@ porterminal/pty/protocol.py,sha256=-OPHIfLxL6R_JTrOQNB2t-sRH7LqtFgJE3QkBcHBqNA,1
61
63
  porterminal/pty/unix.py,sha256=hDwHuD2XD4RN6t_Hk_q-XvgQ4dNF9zUSwJhe0-Y9JBU,5094
62
64
  porterminal/pty/windows.py,sha256=7WrtxgUbqDKSPMK9_pN9vNPzMalV1p-UyyZlBZJn8EY,3933
63
65
  porterminal/static/icon.svg,sha256=y7-MIl7F_wVQMLHWmmC7MrZHZK5ikLg1BR_0jbqnTkc,1949
64
- porterminal/static/index.html,sha256=UJbLVhG9EqGE-FYaF-D0vDw20Ux1dzZ3MtYKu2RDUYc,6627
65
- porterminal/static/manifest.json,sha256=h81-UNLU_V2-BxsjIy8BqODzIN9Ppn-ej1cneZsdR38,688
66
- porterminal/static/sw.js,sha256=1rE3N-4MMwl3kFAyrmsWQWiTbdjfpn33BD6DsVj0oA8,1892
67
- porterminal/static/assets/app-BQiuUo6Q.css,sha256=6agNcSPu-05ATv9AiFxWPbnnn3QmdUa8igeGKAD_MZs,16310
68
- porterminal/static/assets/app-YNN_jEhv.js,sha256=hTMVk2bZNGoS3udG8ukzo4t8afsuiylVvvpXE6gIi94,432496
69
- ptn-0.1.4.dist-info/METADATA,sha256=yx2VYWHaA-3p8TuTZsIR0-tacKQIBvgQp2LrETSk9Xc,5391
70
- ptn-0.1.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
71
- ptn-0.1.4.dist-info/entry_points.txt,sha256=Ftj1zSu_7G0yD5mAtGN3RoewyIuoBOfP_noSISe73tU,41
72
- ptn-0.1.4.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
73
- ptn-0.1.4.dist-info/RECORD,,
66
+ porterminal/static/index.html,sha256=-Jq9BH1etz-IACeTtW3rjGtAJ1r0mrPaezz-P5ZP7JE,6401
67
+ porterminal/static/assets/app-BkHv5qu0.css,sha256=cOi7C-EducTCp9Rje1Eg-uHx7_ouZ81SLFpkgscDs5k,19608
68
+ porterminal/static/assets/app-CaIGfw7i.js,sha256=gy2YVpOIu4t0j4H9UQmwr0BNhtnHieaQUSh01fUVK8Y,436045
69
+ porterminal/static/assets/app-D9ELFbEO.js,sha256=gy2YVpOIu4t0j4H9UQmwr0BNhtnHieaQUSh01fUVK8Y,436045
70
+ porterminal/static/assets/app-DF3nl_io.js,sha256=gy2YVpOIu4t0j4H9UQmwr0BNhtnHieaQUSh01fUVK8Y,436045
71
+ porterminal/static/assets/app-DQePboVd.css,sha256=um-bPz_s6bxB6ZofHC6DHbApYpy5Ds8OEgvmireZfHg,18043
72
+ porterminal/static/assets/app-DoBiVkTD.js,sha256=F7hyoJmjXVSRc84YxyCcnun4Ye10MuWMav5VkrPN6bY,433951
73
+ porterminal/static/assets/app-azbHOsRw.css,sha256=GyIizHTKup9k5s3hP-IK3hUEyUj7L2PqMzQmyb9Xybc,19647
74
+ porterminal/static/assets/app-nMNFwMa6.css,sha256=6gEKuvvj-E2Ir1rscyO7QMeMudFZd_9RJkmi06A4nts,19587
75
+ ptn-0.3.2.dist-info/METADATA,sha256=xmFLblPTr6yP1274_jPkpAZ2SeebtezSbZLyFRy3oqA,6625
76
+ ptn-0.3.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
77
+ ptn-0.3.2.dist-info/entry_points.txt,sha256=Ftj1zSu_7G0yD5mAtGN3RoewyIuoBOfP_noSISe73tU,41
78
+ ptn-0.3.2.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
79
+ ptn-0.3.2.dist-info/RECORD,,
@@ -1,34 +0,0 @@
1
- """YAML configuration loader."""
2
-
3
- from pathlib import Path
4
- from typing import Any
5
-
6
- import yaml
7
-
8
-
9
- class YAMLConfigLoader:
10
- """Load configuration from YAML files."""
11
-
12
- def __init__(self, config_path: Path | str = "config.yaml") -> None:
13
- self._config_path = Path(config_path)
14
-
15
- def load(self) -> dict[str, Any]:
16
- """Load raw configuration data from YAML.
17
-
18
- Returns:
19
- Configuration dictionary, empty dict if file not found.
20
- """
21
- if not self._config_path.exists():
22
- return {}
23
-
24
- with open(self._config_path, encoding="utf-8") as f:
25
- return yaml.safe_load(f) or {}
26
-
27
- def reload(self) -> dict[str, Any]:
28
- """Reload configuration from file."""
29
- return self.load()
30
-
31
- @property
32
- def path(self) -> Path:
33
- """Get configuration file path."""
34
- return self._config_path
@@ -1,32 +0,0 @@
1
- /**
2
- * Copyright (c) 2014 The xterm.js authors. All rights reserved.
3
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
4
- * https://github.com/chjj/term.js
5
- * @license MIT
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in
15
- * all copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- * THE SOFTWARE.
24
- *
25
- * Originally forked from (with the author's permission):
26
- * Fabrice Bellard's javascript vt100 for jslinux:
27
- * http://bellard.org/jslinux/
28
- * Copyright (c) 2011 Fabrice Bellard
29
- * The original design remains. The terminal itself
30
- * has been extended to include xterm CSI codes, among
31
- * other features.
32
- */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}:root{--bg-primary: #1e1e1e;--bg-elevated: #252525;--bg-surface: #2d2d2d;--bg-gradient-top: #232323;--bg-gradient-bottom: #1a1a1a;--text-primary: #cccccc;--text-high: rgba(255, 255, 255, .9);--text-secondary: rgba(255, 255, 255, .7);--text-muted: rgba(255, 255, 255, .5);--text-disabled: rgba(255, 255, 255, .4);--border-subtle: rgba(255, 255, 255, .05);--border-light: rgba(255, 255, 255, .1);--border-medium: rgba(255, 255, 255, .15);--color-success: rgba(100, 220, 100, .8);--color-success-text: rgba(130, 230, 150, 1);--color-success-bg: rgba(100, 200, 120, .15);--color-danger: rgba(255, 100, 100, .8);--color-danger-muted: rgba(255, 120, 120, .7);--color-danger-text: rgba(255, 150, 150, 1);--color-danger-bg: rgba(255, 80, 80, .15);--color-accent: rgba(80, 160, 255, .8);--color-accent-text: rgba(150, 200, 255, 1);--color-accent-bg: rgba(80, 160, 255, .3);--color-accent-strong: rgba(80, 160, 255, .5);--hover-overlay: rgba(255, 255, 255, .05);--active-overlay: rgba(255, 255, 255, .08);--scrollbar-thumb: rgba(255, 255, 255, .15);--scrollbar-hover: rgba(255, 255, 255, .25);--cursor-color: #aeafad;--selection-bg: rgba(38, 79, 120, .5);--shadow-elevated: 0 4px 16px rgba(0, 0, 0, .5);--glow-success: 0 0 6px rgba(100, 220, 100, .4);--glow-danger: 0 0 6px rgba(255, 100, 100, .4);--glow-accent: 0 0 8px rgba(80, 160, 255, .4);--overlay-bg: rgba(0, 0, 0, .9)}.tool-btn,.tab-btn{-webkit-touch-callout:none}html,body{margin:0;padding:0;height:100%;overflow:hidden;background:var(--bg-primary);color:var(--text-primary);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;position:fixed;width:100%;touch-action:none;overscroll-behavior:none}#app{display:flex;flex-direction:column;height:100%;height:100dvh;height:100svh;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);overflow:hidden;overscroll-behavior:none}#tab-bar{display:flex;align-items:center;height:30px;min-height:30px;background:linear-gradient(to bottom,var(--bg-gradient-top),var(--bg-gradient-bottom));border-bottom:1px solid var(--border-subtle);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}#tab-bar::-webkit-scrollbar{display:none}.tab-btn{display:flex;align-items:center;gap:2px;height:30px;padding:0 2px 0 8px;background:transparent;border:none;border-right:1px solid var(--border-subtle);color:var(--text-muted);font-size:12px;cursor:pointer;white-space:nowrap;flex-shrink:0;transition:all .15s ease}.tab-btn:active{background:var(--hover-overlay)}.tab-btn.active{background:var(--active-overlay);color:var(--text-high)}.tab-btn.tab-add{color:var(--text-disabled);font-size:18px;padding:0 10px;border-right:none}.tab-btn.tab-add:active{color:#fffc}.tab-label{max-width:100px;overflow:hidden;text-overflow:ellipsis}.tab-close{display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:2px;border-radius:4px;font-size:14px;color:var(--text-disabled);transition:all .15s ease;position:relative;overflow:hidden}.tab-close:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--color-danger-bg);transform:scaleX(0);transform-origin:left;transition:transform .4s ease-out;z-index:-1}.tab-close.holding:before{transform:scaleX(1)}.tab-close.holding{color:var(--color-danger-text)}.tab-close.ready{background:var(--color-danger-bg);color:var(--color-danger-text);animation:pulseReady .3s ease}@keyframes pulseReady{0%,to{transform:scale(1)}50%{transform:scale(1.1)}}#shell-selector{margin-left:auto;display:flex;align-items:center;padding:0 12px;height:30px;border-left:1px solid var(--border-subtle)}#shell-select{background:transparent;border:none;color:#fff9;font-size:11px;padding:4px 8px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}#connection-dot{width:6px;height:6px;border-radius:50%;background:var(--color-danger);margin-left:12px;margin-right:8px;box-shadow:var(--glow-danger);flex-shrink:0}#connection-dot.connected{background:var(--color-success);box-shadow:var(--glow-success)}#btn-info,#btn-textview,#btn-shutdown{background:transparent;border:none;color:var(--text-disabled);font-size:14px;padding:4px;margin-left:4px;cursor:pointer;transition:color .15s ease}#btn-info:active,#btn-textview:active{color:var(--color-accent)}#btn-shutdown{color:var(--color-danger-muted)}#btn-shutdown:active{color:var(--color-danger-text)}#terminal-container{flex:1;overflow:hidden;background:var(--bg-primary);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none;overscroll-behavior:contain;contain:strict;isolation:isolate}#terminal{height:100%!important;width:100%!important;contain:layout paint}.terminal-instance{height:100%;width:100%;contain:layout paint}.xterm-screen canvas,.xterm canvas{transform:translateZ(0);backface-visibility:hidden}#terminal .xterm-viewport{background:var(--bg-primary)!important;touch-action:none;overscroll-behavior:contain;contain:paint}#terminal .xterm-viewport::-webkit-scrollbar{width:8px}#terminal .xterm-viewport::-webkit-scrollbar-track{background:transparent}#terminal .xterm-viewport::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:4px}#terminal .xterm-viewport::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-hover)}#terminal .xterm-screen{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}#terminal .xterm-helper-textarea,.xterm-helper-textarea{-webkit-text-security:none!important;font-size:16px!important;-webkit-user-select:text;user-select:text}.xterm-helper-textarea::-webkit-contacts-auto-fill-button,.xterm-helper-textarea::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0;width:0;height:0}#toolbar{display:flex;flex-direction:column;background:linear-gradient(to bottom,var(--bg-gradient-top),var(--bg-gradient-bottom));border-top:1px solid var(--border-subtle);padding-bottom:env(safe-area-inset-bottom,0px)}.toolbar-row{display:flex;align-items:center;justify-content:center;height:30px;min-height:30px;gap:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.toolbar-row:first-child{border-bottom:1px solid var(--border-subtle)}.toolbar-row::-webkit-scrollbar{display:none}.tool-btn{display:flex;align-items:center;justify-content:center;height:30px;padding:0 10px;background:transparent;border:none;border-right:1px solid var(--border-subtle);border-radius:0;color:var(--text-muted);font-size:12px;cursor:pointer;transition:all .15s ease;-webkit-touch-callout:none;flex-shrink:0}.tool-btn:active{background:var(--hover-overlay);color:var(--text-high)}.tool-btn.arrow{padding:0 10px}.tool-btn.danger{color:var(--color-danger-muted)}.tool-btn.danger:active{background:var(--color-danger-bg);color:var(--color-danger-text)}.tool-btn.modifier{padding:0 10px}.tool-btn.icon{font-size:18px}.tool-btn.enter{color:#64c878cc}.tool-btn.enter:active{background:var(--color-success-bg);color:var(--color-success-text)}.tool-btn.sticky{background:var(--color-accent-bg);color:var(--color-accent-text)}.tool-btn.locked{background:var(--color-accent-strong);color:#fff;box-shadow:var(--glow-accent)}#disconnect-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--overlay-bg);z-index:1000;display:flex;align-items:center;justify-content:center}#disconnect-content{text-align:center}#disconnect-icon{font-size:48px;color:var(--color-danger);margin-bottom:16px}#disconnect-text{color:var(--text-secondary);font-size:18px;margin-bottom:24px}#disconnect-retry{padding:12px 32px;background:var(--border-light);border:1px solid var(--border-medium);border-radius:8px;color:#fffc;font-size:14px;cursor:pointer;transition:all .15s ease}#disconnect-retry:active{background:#fff3;color:#fff}#copy-button{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:8px 20px;background:linear-gradient(to bottom,var(--bg-surface),var(--bg-elevated));border:1px solid var(--border-light);border-radius:6px;color:var(--text-high);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;font-weight:500;cursor:pointer;z-index:10000;box-shadow:var(--shadow-elevated);display:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;touch-action:manipulation;transition:all .15s ease}#copy-button:active{background:linear-gradient(to bottom,#3a3a3a,var(--bg-surface));transform:translate(-50%,-50%) scale(.97)}#copy-button.visible{display:block;animation:copyButtonAppear .1s ease-out}#copy-button.success{background:linear-gradient(to bottom,#2a3a2a,#1f2f1f);border-color:#64c8784d;color:var(--color-success-text)}#copy-button.error{background:linear-gradient(to bottom,#3a2a2a,#2f1f1f);border-color:#ff78784d;color:var(--color-danger-text)}@keyframes copyButtonAppear{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}#help-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--overlay-bg);z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px}#help-content{background:var(--bg-elevated);border:1px solid var(--border-light);border-radius:12px;max-width:320px;width:100%;box-shadow:var(--shadow-elevated);animation:helpAppear .15s ease-out}@keyframes helpAppear{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}#help-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border-subtle);color:var(--text-high);font-size:14px;font-weight:500}#help-close{background:transparent;border:none;color:var(--text-muted);font-size:20px;cursor:pointer;padding:4px 8px;line-height:1}#help-close:active{color:var(--text-high)}#help-body{padding:12px 16px}.help-section{margin-bottom:12px}.help-section:last-child{margin-bottom:0}.help-title{color:var(--text-muted);font-size:10px;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.help-item{display:flex;align-items:center;gap:10px;padding:4px 0;color:var(--text-secondary);font-size:12px}.help-key{display:inline-block;min-width:80px;padding:2px 6px;background:var(--bg-surface);border:1px solid var(--border-subtle);border-radius:4px;color:var(--text-high);font-size:11px;text-align:center}#textview-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--bg-primary);z-index:1000;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}#textview-content{display:flex;flex-direction:column;width:100%;height:100%;background:var(--bg-primary)}#textview-header{display:flex;align-items:center;height:30px;min-height:30px;background:linear-gradient(to bottom,var(--bg-gradient-top),var(--bg-gradient-bottom));border-bottom:1px solid var(--border-subtle);flex-shrink:0}#textview-title{padding:0 12px;color:var(--text-muted);font-size:12px;border-right:1px solid var(--border-subtle)}.textview-zoom-btn{display:flex;align-items:center;justify-content:center;height:30px;padding:0 12px;background:transparent;border:none;border-right:1px solid var(--border-subtle);color:var(--text-muted);font-size:14px;cursor:pointer;transition:all .15s ease}.textview-zoom-btn:active{background:var(--hover-overlay);color:var(--text-high)}#textview-close{margin-left:auto;display:flex;align-items:center;justify-content:center;height:30px;padding:0 12px;background:transparent;border:none;border-left:1px solid var(--border-subtle);color:var(--text-muted);font-size:16px;cursor:pointer;transition:all .15s ease}#textview-close:active{background:var(--hover-overlay);color:var(--text-high)}#textview-body{flex:1;min-height:0;margin:0;padding:8px 12px;background:var(--bg-primary);border:none;color:var(--text-primary);font-family:Menlo,Monaco,Consolas,monospace;font-size:10px;line-height:1.3;overflow-y:auto;white-space:pre-wrap;word-wrap:break-word;user-select:text;-webkit-user-select:text}.hidden{display:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}