feat(cli,core): add local interactive shell (conn shell), Ctrl+Space passthrough and bump to v6.1.0
- Add `conn shell` CLI subcommand for spawning local interactive shells with AI Copilot support. - Implement `protocol="local"` on core `node` class with PTY process spawning, dynamic PWD tracking (/proc/PID/cwd + OSC 7), and AI metadata mapping. - Implement `_is_child_connpy_active()` to inspect PTY slave foreground process group (tcgetpgrp + /proc/PGID/cmdline). - Automatically pass `Ctrl+Space` (b'\x00') down to child foreground `conn` / `connpy` processes when running nested sessions in local shell. - Add `--shell-command`, `--shell-prompt`, and `--shell-os` configuration options to `conn config`. - Update `README.md` and `connpy/__init__.py` documentation to include `conn shell` and PAT API Token management. - Add comprehensive unit tests in `test_local_shell.py` and `test_completion.py`. - Bump version to v6.1.0 and regenerate full HTML documentation in `docs/` via pdoc.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
</p>
|
||||
|
||||
|
||||
# Connpy (v6.0.3)
|
||||
# Connpy (v6.1.0)
|
||||
[](https://pypi.org/pypi/connpy/)
|
||||
[](https://pypi.org/pypi/connpy/)
|
||||
[](https://pypi.org/pypi/connpy/)
|
||||
@@ -44,6 +44,21 @@ Connect to external data sources and tools dynamically via the Model Context Pro
|
||||
conn ai --mcp
|
||||
```
|
||||
|
||||
### 1d. Local Interactive Shell (conn shell)
|
||||
Launch a local interactive shell with AI Copilot support enabled directly on your host machine:
|
||||
```bash
|
||||
conn shell # Start local shell (default: $SHELL or /bin/bash)
|
||||
conn shell -c /bin/zsh # Override shell executable
|
||||
conn shell --capture session.log # Log session output to file
|
||||
```
|
||||
* **Nested Sessions & Passthrough**: Supports running nested `conn` / `connpy` connections inside `conn shell`. Automatically detects foreground `conn` processes and forwards `Ctrl+Space` down to the active device connection instead of triggering the local Copilot.
|
||||
* **Shell Configuration**: Configure default shell command, prompt regex, or OS type via `conn config`:
|
||||
```bash
|
||||
conn config --shell-command /bin/zsh
|
||||
conn config --shell-prompt "\$\s*$"
|
||||
conn config --shell-os ubuntu
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
|
||||
@@ -179,14 +194,19 @@ conn config --service-mode remote
|
||||
conn config --remote localhost:50051
|
||||
```
|
||||
|
||||
### 8c. User Management
|
||||
Manage server-side user credentials for distributed setups:
|
||||
### 8c. User Management & API Tokens
|
||||
Manage server-side user credentials and Personal Access Tokens (PAT) for automated setups:
|
||||
```bash
|
||||
conn user --add username
|
||||
conn user --list
|
||||
conn user --regen-password username
|
||||
|
||||
# Personal Access Tokens (PAT) for non-interactive API access
|
||||
conn user --create-token "CI/CD Token" --expires-in 30
|
||||
conn user --list-tokens
|
||||
conn user --revoke-token <token_id>
|
||||
```
|
||||
Use `--path` to specify custom configuration folders in server Mode B.
|
||||
Use `--path` to specify custom configuration folders in server Mode B. Pass API tokens via `CONNPY_TOKEN` environment variable.
|
||||
|
||||
### 8d. SSO / OIDC
|
||||
Configure identity providers (e.g. Authelia, Keycloak) for SSO gRPC authentication using the interactive wizard:
|
||||
|
||||
Reference in New Issue
Block a user