vssh 4.1.4__tar.gz → 4.2.1__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.
Files changed (75) hide show
  1. vssh-4.2.1/.github/ISSUE_TEMPLATE/bug_report.md +20 -0
  2. vssh-4.2.1/.github/ISSUE_TEMPLATE/config.yml +5 -0
  3. vssh-4.2.1/.github/workflows/ci.yml +34 -0
  4. vssh-4.2.1/.github/workflows/release.yml +55 -0
  5. vssh-4.2.1/.gitignore +23 -0
  6. vssh-4.2.1/CHANGELOG.md +74 -0
  7. vssh-4.2.1/CONTRIBUTING.md +6 -0
  8. vssh-4.2.1/HELP.md +115 -0
  9. vssh-4.2.1/Makefile +36 -0
  10. vssh-4.2.1/PKG-INFO +353 -0
  11. vssh-4.2.1/README.ko.md +326 -0
  12. vssh-4.2.1/README.md +332 -0
  13. vssh-4.2.1/SECURITY.md +16 -0
  14. vssh-4.2.1/cmd/vssh/doctor.go +297 -0
  15. vssh-4.2.1/cmd/vssh/fanout_test.go +46 -0
  16. vssh-4.2.1/cmd/vssh/main.go +792 -0
  17. vssh-4.2.1/cmd/vssh/mcp.go +1840 -0
  18. vssh-4.2.1/cmd/vssh/mcp_test.go +373 -0
  19. vssh-4.2.1/docs/AI_NATIVE_CAPABILITIES.ko.md +378 -0
  20. vssh-4.2.1/docs/CODEX_ORCHESTRATION.ko.md +198 -0
  21. vssh-4.2.1/docs/CODEX_ORCHESTRATION.md +214 -0
  22. vssh-4.2.1/docs/DIRECTION.md +130 -0
  23. vssh-4.2.1/docs/DISTRIBUTION.ko.md +80 -0
  24. vssh-4.2.1/docs/NETWORK_TRAVERSAL_AUDIT.ko.md +166 -0
  25. vssh-4.2.1/docs/PERFORMANCE.ko.md +63 -0
  26. vssh-4.2.1/docs/PUBLISHING_AUDIT.ko.md +47 -0
  27. vssh-4.2.1/docs/PUBLISHING_AUDIT.md +49 -0
  28. vssh-4.2.1/docs/PYTHON_SDK.ko.md +66 -0
  29. vssh-4.2.1/docs/WHY_VSSH.ko.md +69 -0
  30. vssh-4.2.1/docs/WHY_VSSH.md +76 -0
  31. vssh-4.2.1/go.mod +8 -0
  32. vssh-4.2.1/go.sum +6 -0
  33. vssh-4.2.1/install.sh +51 -0
  34. vssh-4.2.1/internal/adapter/vssh.go +158 -0
  35. vssh-4.2.1/internal/agent/agent.go +457 -0
  36. vssh-4.2.1/internal/agent/api.go +127 -0
  37. vssh-4.2.1/internal/config/config.go +128 -0
  38. vssh-4.2.1/internal/event/event.go +157 -0
  39. vssh-4.2.1/internal/server/artifact_test.go +54 -0
  40. vssh-4.2.1/internal/server/auth.go +95 -0
  41. vssh-4.2.1/internal/server/auth_test.go +57 -0
  42. vssh-4.2.1/internal/server/client.go +81 -0
  43. vssh-4.2.1/internal/server/exec_test.go +23 -0
  44. vssh-4.2.1/internal/server/jobs.go +213 -0
  45. vssh-4.2.1/internal/server/jobs_test.go +92 -0
  46. vssh-4.2.1/internal/server/pty_darwin.go +106 -0
  47. vssh-4.2.1/internal/server/pty_linux.go +120 -0
  48. vssh-4.2.1/internal/server/relay.go +54 -0
  49. vssh-4.2.1/internal/server/rpc.go +687 -0
  50. vssh-4.2.1/internal/server/server.go +239 -0
  51. vssh-4.2.1/internal/server/sync.go +225 -0
  52. vssh-4.2.1/internal/server/transfer.go +581 -0
  53. vssh-4.2.1/internal/server/transfer_advanced.go +949 -0
  54. vssh-4.2.1/internal/server/transfer_test.go +24 -0
  55. vssh-4.2.1/internal/ssh/ssh.go +962 -0
  56. vssh-4.2.1/internal/ssh/ssh_test.go +57 -0
  57. vssh-4.2.1/pyproject.toml +31 -0
  58. vssh-4.2.1/src/vssh/__init__.py +11 -0
  59. vssh-4.2.1/src/vssh/client.py +255 -0
  60. vssh-4.2.1/tests/test_python_sdk.py +122 -0
  61. vssh-4.1.4/LICENSE +0 -21
  62. vssh-4.1.4/PKG-INFO +0 -224
  63. vssh-4.1.4/README.md +0 -207
  64. vssh-4.1.4/pyproject.toml +0 -33
  65. vssh-4.1.4/setup.cfg +0 -4
  66. vssh-4.1.4/vssh/__init__.py +0 -55
  67. vssh-4.1.4/vssh/bin/vssh-darwin-amd64 +0 -0
  68. vssh-4.1.4/vssh/bin/vssh-darwin-arm64 +0 -0
  69. vssh-4.1.4/vssh/bin/vssh-linux-amd64 +0 -0
  70. vssh-4.1.4/vssh/bin/vssh-linux-arm64 +0 -0
  71. vssh-4.1.4/vssh.egg-info/PKG-INFO +0 -224
  72. vssh-4.1.4/vssh.egg-info/SOURCES.txt +0 -13
  73. vssh-4.1.4/vssh.egg-info/dependency_links.txt +0 -1
  74. vssh-4.1.4/vssh.egg-info/entry_points.txt +0 -2
  75. vssh-4.1.4/vssh.egg-info/top_level.txt +0 -1
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Bug report
3
+ about: vssh client, server, or SSH fallback issue
4
+ labels: bug
5
+ ---
6
+
7
+ ## Version
8
+ `vssh version` output:
9
+
10
+ ## Mode
11
+ Native (`vssh server` / `run` / `put`) or SSH/SCP fallback?
12
+
13
+ ## Platform
14
+
15
+ ## What happened
16
+
17
+ ## Expected
18
+
19
+ ## Reproduction / config
20
+ (Redact `VSSH_SECRET`, hostnames if needed.)
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security advisory
4
+ url: https://github.com/meshpop/vssh/security/advisories/new
5
+ about: Report vulnerabilities privately.
@@ -0,0 +1,34 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: actions/setup-go@v5
16
+ with:
17
+ go-version-file: go.mod
18
+
19
+ - name: Vet
20
+ run: go vet ./...
21
+
22
+ - name: Build
23
+ run: go build ./...
24
+
25
+ - name: Test
26
+ run: go test ./...
27
+
28
+ - name: Shell script syntax
29
+ shell: bash
30
+ run: |
31
+ while IFS= read -r f; do
32
+ [[ -z "$f" ]] && continue
33
+ bash -n "$f"
34
+ done < <(git ls-files '*.sh')
@@ -0,0 +1,55 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ release:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - uses: actions/setup-go@v5
19
+ with:
20
+ go-version-file: go.mod
21
+
22
+ - name: Build release binaries
23
+ shell: bash
24
+ run: |
25
+ set -euo pipefail
26
+ mkdir -p dist
27
+ version="${GITHUB_REF_NAME:-dev}"
28
+ build_time="$(date -u '+%Y-%m-%d_%H:%M:%S')"
29
+ ldflags="-s -w -X main.version=${version#v} -X main.buildTime=${build_time}"
30
+
31
+ for target in \
32
+ linux/amd64 \
33
+ linux/arm64 \
34
+ darwin/amd64 \
35
+ darwin/arm64
36
+ do
37
+ os="${target%/*}"
38
+ arch="${target#*/}"
39
+ out="dist/vssh-${os}-${arch}"
40
+ GOOS="$os" GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "$ldflags" -o "$out" ./cmd/vssh
41
+ done
42
+
43
+ cd dist
44
+ sha256sum vssh-* > checksums.txt
45
+
46
+ - name: Publish GitHub release
47
+ uses: softprops/action-gh-release@v2
48
+ with:
49
+ files: |
50
+ dist/vssh-linux-amd64
51
+ dist/vssh-linux-arm64
52
+ dist/vssh-darwin-amd64
53
+ dist/vssh-darwin-arm64
54
+ dist/checksums.txt
55
+ generate_release_notes: true
vssh-4.2.1/.gitignore ADDED
@@ -0,0 +1,23 @@
1
+ # Build outputs
2
+ /vssh
3
+ /vssh-*
4
+ !/vssh-*.md
5
+ /dist/
6
+ /build/
7
+ __pycache__/
8
+ *.pyc
9
+ *.egg-info/
10
+
11
+ # Local configuration and secrets
12
+ .env
13
+ .env.*
14
+ !.env.example
15
+ *.pem
16
+ *.key
17
+ id_rsa*
18
+ known_hosts
19
+
20
+ # OS/editor noise
21
+ .DS_Store
22
+ *.swp
23
+ *.tmp
@@ -0,0 +1,74 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ## [v0.7.5] - 2026-05-22
6
+
7
+ ### Runtime
8
+
9
+ - Add `vssh doctor` / `vssh setup-check` for AI-operator setup diagnostics:
10
+ effective binary, stale binary conflicts, secret source, Wire config, and peer
11
+ counts.
12
+ - Add MCP `vssh_doctor` so Codex, Claude, Cursor, and other MCP clients can
13
+ diagnose VSSH before attempting execution or facts calls.
14
+ - Prefer MCP-safe underscore tool names and deduplicate exposed tools.
15
+ - Read native secrets from `/etc/vssh/secret` and `~/.vssh/secret` before
16
+ falling back to Wire-derived secrets.
17
+
18
+ ### Python SDK
19
+
20
+ - Add `VSSH.doctor()` to call `vssh doctor --json`.
21
+
22
+ ## [v0.7.4] - 2026-05-16
23
+
24
+ ### Runtime
25
+
26
+ - Add `vssh.route.select` / `vssh_route_select` for capability, tag, and health-aware host routing.
27
+ - Add `vssh.exec.routed` / `vssh_exec_routed` to route first, then execute with policy and evidence.
28
+ - Return route decisions with selected host, score, reasons, missing capabilities, health, tags, and candidate host records.
29
+ - Keep monitoring separate: `vssh.hosts.list`, `vssh.route.select`, and `vssh.exec.routed` can optionally merge live health from an external MeshClaw/mpop-style monitor endpoint using `monitor_url` or `monitor_port`.
30
+
31
+ ## [v0.7.3] - 2026-05-16
32
+
33
+ ### Runtime
34
+
35
+ - Enrich `vssh.hosts.list` output with `addresses`, `tags`, `capabilities`, `health`, `stats`, `os`, `arch`, and metadata fields for agent routing.
36
+ - Extend `~/.vssh/servers.json` support with optional `tags`, `capabilities`, `roles`, `os`, `arch`, `public_ip`, `lan_ip`, `port`, and `metadata`.
37
+ - Infer basic capabilities from tags/roles/OS names, including `gpu`, `cuda`, `ollama`, `browser`, `controller`, `mail`, `docker`, `linux`, and `macos`.
38
+ - Add health summaries based on provider online state, `last_seen`, and resource pressure.
39
+
40
+ ## [v0.7.2] - 2026-05-16
41
+
42
+ ### Runtime
43
+
44
+ - Add agent-facing MCP tool aliases: `vssh.hosts.list`, `vssh.exec`, `vssh.exec.safe`, and `vssh.policy.check`.
45
+ - Add a built-in safety policy that blocks destructive/service-impacting command patterns unless `allow_dangerous` is explicitly set.
46
+ - Wrap MCP execution responses in evidence envelopes with timestamps, policy decision, target, command, timeout, and structured execution result.
47
+
48
+ ### Documentation
49
+
50
+ - README / README.ko: link to canonical stack snapshot [`meshpop/wire` **docs/CURRENT_STATE.md**](https://github.com/meshpop/wire/blob/main/docs/CURRENT_STATE.md).
51
+ - Document Codex/Runtime MCP usage in English and Korean.
52
+
53
+ ## [v0.7.1] - 2026-05-16
54
+
55
+ ### Runtime
56
+
57
+ - Preserve MCP `vssh_exec` shell commands as one script instead of splitting with `strings.Fields`.
58
+ - Return structured execution evidence with stdout, stderr, exit code, duration, attempts, transport, fallback, and typed retryable errors.
59
+ - Fix root-run `vsshd` transfer ownership so PUT/PUTZ/RESUME/MPUT/PIPE_UP outputs are usable by the default non-root runtime user.
60
+
61
+ ## [v0.7.0] - 2026-05-14
62
+
63
+ ### Changed
64
+
65
+ - Remove `mesh-event` dependency; standalone `go build`.
66
+ - Document `internal/adapter` as **discovery-only**; `VSSHAdapter.Exec` remains unimplemented by design until explicitly specified.
67
+
68
+ ### Fixed
69
+
70
+ - `go vet` cleanups (IPv6 literals) where applicable.
71
+
72
+ ## Earlier releases
73
+
74
+ See Git tags and GitHub Releases.
@@ -0,0 +1,6 @@
1
+ # Contributing
2
+
3
+ - **Branches:** PRs to `main`; describe behavior changes (especially auth / `vssh server`).
4
+ - **Build:** `go vet ./...`, `go build ./...`, `go test ./...` (CI matches).
5
+ - **Shell:** `bash -n install.sh` when editing installers.
6
+ - **Security:** [Security advisories](https://github.com/meshpop/vssh/security/advisories/new) for private reports.
vssh-4.2.1/HELP.md ADDED
@@ -0,0 +1,115 @@
1
+ # VSSH
2
+
3
+ ## What is VSSH
4
+
5
+ VSSH is an AI-native remote execution daemon/protocol for private networks.
6
+
7
+ - No sshd required on target
8
+ - Built-in PTY, RPC, file transfer, and execution evidence
9
+ - HMAC authentication
10
+ - Node-name routing over Tailscale, VPN, LAN, or configured addresses
11
+
12
+ ## Components
13
+
14
+ | Binary | Description |
15
+ |--------|-------------|
16
+ | `vssh server` | Server daemon (port 48291) |
17
+ | `vssh` | CLI client |
18
+
19
+ ## Quick Start
20
+
21
+ ```bash
22
+ # Server side
23
+ export VSSH_SECRET=your-secret
24
+ vssh server
25
+
26
+ # Client side
27
+ export VSSH_SECRET=your-secret
28
+ vssh shell hostname # Interactive shell
29
+ vssh run hostname "cmd" # Execute command
30
+ vssh doctor --json # Diagnose setup before MCP/AI use
31
+ ```
32
+
33
+ ## CLI Commands
34
+
35
+ ### Native Protocol
36
+
37
+ ```bash
38
+ vssh <host> # Interactive PTY shell
39
+ vssh shell <host> # Interactive PTY shell
40
+ vssh run <host> <command> # Execute command
41
+ vssh exec <host> <command> # Alias for native run
42
+ vssh put <local> <host:path> # Upload
43
+ vssh get <host:path> <local> # Download
44
+ ```
45
+
46
+ ### Status
47
+
48
+ ```bash
49
+ vssh status # Show dashboard
50
+ vssh list # List all peers
51
+ vssh doctor # Diagnose binary, secret, config, and peers
52
+ vssh version # Show version
53
+ ```
54
+
55
+ ## Data Sources
56
+
57
+ VSSH discovers peers from multiple sources:
58
+
59
+ 1. Wire VPN coordinator
60
+ 2. Tailscale
61
+ 3. Config file (~/.vssh/servers.json)
62
+ 4. Cache
63
+
64
+ ## Configuration
65
+
66
+ ### Server Config
67
+
68
+ `~/.vssh/servers.json`:
69
+
70
+ ```json
71
+ {
72
+ "web1": {"ip": "192.0.2.10", "user": "deploy"},
73
+ "db1": {"ip": "192.0.2.20", "user": "postgres"}
74
+ }
75
+ ```
76
+
77
+ ### User Mapping
78
+
79
+ Per-host SSH user overrides are read from Wire’s config directory (same as the Wire CLI), not under `~/.vssh/`:
80
+
81
+ - Non-root: `~/.wire/users.json`
82
+ - Root: `/etc/wire/users.json`
83
+
84
+ Example (`~/.wire/users.json`):
85
+
86
+ ```json
87
+ {
88
+ "web1": "deploy",
89
+ "db1": "postgres"
90
+ }
91
+ ```
92
+
93
+ ## Environment Variables
94
+
95
+ | Variable | Description |
96
+ |----------|-------------|
97
+ | `VSSH_SECRET` | Primary shared secret for native protocol (set on client and server). |
98
+ | `VSSH_PORT` | Native server listen port (default: **48291**). |
99
+ | `WIRE_SERVER_URL` | If `VSSH_SECRET` is empty, a derived secret can be computed from this URL (and from `server_url` in Wire JSON config). |
100
+ | `VSSH_INSECURE_ALLOW_EMPTY_SECRET` | Set to `1` **only in isolated labs** to allow a native server with no secret (unsafe). |
101
+
102
+ ## Security
103
+
104
+ - **Native `vssh server`** uses **HMAC** on a shared secret over **plain TCP**. **WireGuard** only encrypts traffic **inside the VPN**; it does **not** replace vssh authentication. Always set a strong secret (or derived secret) and firewall the listen port.
105
+ - VSSH does not expose an OpenSSH wrapper command. Use `ssh` directly for normal sshd-backed shell access.
106
+ - **`internal/adapter`**: discovery / `Probe` only; `Exec` is not implemented. Use native server commands for product execution.
107
+
108
+ ## Architecture
109
+
110
+ | Package | Purpose |
111
+ |---------|---------|
112
+ | `internal/server` | Native protocol server and client |
113
+ | `internal/ssh` | Discovery helper and legacy internal connector |
114
+ | `internal/adapter` | Config-based node discovery and probing (Exec not implemented) |
115
+ | `internal/agent` | Monitoring agent with event logging |
vssh-4.2.1/Makefile ADDED
@@ -0,0 +1,36 @@
1
+ VERSION := 0.7.5
2
+ BUILD_TIME := $(shell date -u '+%Y-%m-%d_%H:%M:%S')
3
+ LDFLAGS := -ldflags "-s -w -X main.version=$(VERSION) -X main.buildTime=$(BUILD_TIME)"
4
+
5
+ .PHONY: all build clean install test test-python release checksums
6
+
7
+ all: build
8
+
9
+ build:
10
+ go build $(LDFLAGS) -o vssh ./cmd/vssh
11
+
12
+ test:
13
+ go test ./...
14
+ PYTHONPATH=src python3 -m unittest discover -s tests
15
+
16
+ test-python:
17
+ PYTHONPATH=src python3 -m unittest discover -s tests
18
+
19
+ clean:
20
+ rm -rf vssh vssh-* dist
21
+
22
+ install: build
23
+ sudo cp vssh /usr/local/bin/
24
+ @echo "Installed to /usr/local/bin"
25
+
26
+ release:
27
+ mkdir -p dist
28
+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o dist/vssh-linux-amd64 ./cmd/vssh
29
+ CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build $(LDFLAGS) -o dist/vssh-linux-arm64 ./cmd/vssh
30
+ CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o dist/vssh-darwin-amd64 ./cmd/vssh
31
+ CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build $(LDFLAGS) -o dist/vssh-darwin-arm64 ./cmd/vssh
32
+ $(MAKE) checksums
33
+ @ls -la dist
34
+
35
+ checksums:
36
+ cd dist && shasum -a 256 vssh-* > checksums.txt