vssh 4.1.4__tar.gz → 4.2.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.
Files changed (74) hide show
  1. vssh-4.2.0/.github/ISSUE_TEMPLATE/bug_report.md +20 -0
  2. vssh-4.2.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  3. vssh-4.2.0/.github/workflows/ci.yml +34 -0
  4. vssh-4.2.0/.github/workflows/release.yml +55 -0
  5. vssh-4.2.0/.gitignore +23 -0
  6. vssh-4.2.0/CHANGELOG.md +57 -0
  7. vssh-4.2.0/CONTRIBUTING.md +6 -0
  8. vssh-4.2.0/HELP.md +113 -0
  9. vssh-4.2.0/Makefile +36 -0
  10. vssh-4.2.0/PKG-INFO +349 -0
  11. vssh-4.2.0/README.ko.md +326 -0
  12. vssh-4.2.0/README.md +328 -0
  13. vssh-4.2.0/SECURITY.md +16 -0
  14. vssh-4.2.0/cmd/vssh/fanout_test.go +46 -0
  15. vssh-4.2.0/cmd/vssh/main.go +789 -0
  16. vssh-4.2.0/cmd/vssh/mcp.go +1791 -0
  17. vssh-4.2.0/cmd/vssh/mcp_test.go +335 -0
  18. vssh-4.2.0/docs/AI_NATIVE_CAPABILITIES.ko.md +378 -0
  19. vssh-4.2.0/docs/CODEX_ORCHESTRATION.ko.md +198 -0
  20. vssh-4.2.0/docs/CODEX_ORCHESTRATION.md +214 -0
  21. vssh-4.2.0/docs/DIRECTION.md +130 -0
  22. vssh-4.2.0/docs/DISTRIBUTION.ko.md +80 -0
  23. vssh-4.2.0/docs/NETWORK_TRAVERSAL_AUDIT.ko.md +166 -0
  24. vssh-4.2.0/docs/PERFORMANCE.ko.md +63 -0
  25. vssh-4.2.0/docs/PUBLISHING_AUDIT.ko.md +47 -0
  26. vssh-4.2.0/docs/PUBLISHING_AUDIT.md +49 -0
  27. vssh-4.2.0/docs/PYTHON_SDK.ko.md +66 -0
  28. vssh-4.2.0/docs/WHY_VSSH.ko.md +69 -0
  29. vssh-4.2.0/docs/WHY_VSSH.md +76 -0
  30. vssh-4.2.0/go.mod +8 -0
  31. vssh-4.2.0/go.sum +6 -0
  32. vssh-4.2.0/install.sh +51 -0
  33. vssh-4.2.0/internal/adapter/vssh.go +158 -0
  34. vssh-4.2.0/internal/agent/agent.go +457 -0
  35. vssh-4.2.0/internal/agent/api.go +127 -0
  36. vssh-4.2.0/internal/config/config.go +128 -0
  37. vssh-4.2.0/internal/event/event.go +157 -0
  38. vssh-4.2.0/internal/server/artifact_test.go +54 -0
  39. vssh-4.2.0/internal/server/auth.go +79 -0
  40. vssh-4.2.0/internal/server/auth_test.go +57 -0
  41. vssh-4.2.0/internal/server/client.go +81 -0
  42. vssh-4.2.0/internal/server/exec_test.go +23 -0
  43. vssh-4.2.0/internal/server/jobs.go +213 -0
  44. vssh-4.2.0/internal/server/jobs_test.go +92 -0
  45. vssh-4.2.0/internal/server/pty_darwin.go +106 -0
  46. vssh-4.2.0/internal/server/pty_linux.go +120 -0
  47. vssh-4.2.0/internal/server/relay.go +54 -0
  48. vssh-4.2.0/internal/server/rpc.go +687 -0
  49. vssh-4.2.0/internal/server/server.go +239 -0
  50. vssh-4.2.0/internal/server/sync.go +225 -0
  51. vssh-4.2.0/internal/server/transfer.go +581 -0
  52. vssh-4.2.0/internal/server/transfer_advanced.go +949 -0
  53. vssh-4.2.0/internal/server/transfer_test.go +24 -0
  54. vssh-4.2.0/internal/ssh/ssh.go +962 -0
  55. vssh-4.2.0/internal/ssh/ssh_test.go +57 -0
  56. vssh-4.2.0/pyproject.toml +31 -0
  57. vssh-4.2.0/src/vssh/__init__.py +11 -0
  58. vssh-4.2.0/src/vssh/client.py +249 -0
  59. vssh-4.2.0/tests/test_python_sdk.py +113 -0
  60. vssh-4.1.4/LICENSE +0 -21
  61. vssh-4.1.4/PKG-INFO +0 -224
  62. vssh-4.1.4/README.md +0 -207
  63. vssh-4.1.4/pyproject.toml +0 -33
  64. vssh-4.1.4/setup.cfg +0 -4
  65. vssh-4.1.4/vssh/__init__.py +0 -55
  66. vssh-4.1.4/vssh/bin/vssh-darwin-amd64 +0 -0
  67. vssh-4.1.4/vssh/bin/vssh-darwin-arm64 +0 -0
  68. vssh-4.1.4/vssh/bin/vssh-linux-amd64 +0 -0
  69. vssh-4.1.4/vssh/bin/vssh-linux-arm64 +0 -0
  70. vssh-4.1.4/vssh.egg-info/PKG-INFO +0 -224
  71. vssh-4.1.4/vssh.egg-info/SOURCES.txt +0 -13
  72. vssh-4.1.4/vssh.egg-info/dependency_links.txt +0 -1
  73. vssh-4.1.4/vssh.egg-info/entry_points.txt +0 -2
  74. 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.0/.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,57 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ## [v0.7.4] - 2026-05-16
6
+
7
+ ### Runtime
8
+
9
+ - Add `vssh.route.select` / `vssh_route_select` for capability, tag, and health-aware host routing.
10
+ - Add `vssh.exec.routed` / `vssh_exec_routed` to route first, then execute with policy and evidence.
11
+ - Return route decisions with selected host, score, reasons, missing capabilities, health, tags, and candidate host records.
12
+ - 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`.
13
+
14
+ ## [v0.7.3] - 2026-05-16
15
+
16
+ ### Runtime
17
+
18
+ - Enrich `vssh.hosts.list` output with `addresses`, `tags`, `capabilities`, `health`, `stats`, `os`, `arch`, and metadata fields for agent routing.
19
+ - Extend `~/.vssh/servers.json` support with optional `tags`, `capabilities`, `roles`, `os`, `arch`, `public_ip`, `lan_ip`, `port`, and `metadata`.
20
+ - Infer basic capabilities from tags/roles/OS names, including `gpu`, `cuda`, `ollama`, `browser`, `controller`, `mail`, `docker`, `linux`, and `macos`.
21
+ - Add health summaries based on provider online state, `last_seen`, and resource pressure.
22
+
23
+ ## [v0.7.2] - 2026-05-16
24
+
25
+ ### Runtime
26
+
27
+ - Add agent-facing MCP tool aliases: `vssh.hosts.list`, `vssh.exec`, `vssh.exec.safe`, and `vssh.policy.check`.
28
+ - Add a built-in safety policy that blocks destructive/service-impacting command patterns unless `allow_dangerous` is explicitly set.
29
+ - Wrap MCP execution responses in evidence envelopes with timestamps, policy decision, target, command, timeout, and structured execution result.
30
+
31
+ ### Documentation
32
+
33
+ - 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).
34
+ - Document Codex/Runtime MCP usage in English and Korean.
35
+
36
+ ## [v0.7.1] - 2026-05-16
37
+
38
+ ### Runtime
39
+
40
+ - Preserve MCP `vssh_exec` shell commands as one script instead of splitting with `strings.Fields`.
41
+ - Return structured execution evidence with stdout, stderr, exit code, duration, attempts, transport, fallback, and typed retryable errors.
42
+ - Fix root-run `vsshd` transfer ownership so PUT/PUTZ/RESUME/MPUT/PIPE_UP outputs are usable by the default non-root runtime user.
43
+
44
+ ## [v0.7.0] - 2026-05-14
45
+
46
+ ### Changed
47
+
48
+ - Remove `mesh-event` dependency; standalone `go build`.
49
+ - Document `internal/adapter` as **discovery-only**; `VSSHAdapter.Exec` remains unimplemented by design until explicitly specified.
50
+
51
+ ### Fixed
52
+
53
+ - `go vet` cleanups (IPv6 literals) where applicable.
54
+
55
+ ## Earlier releases
56
+
57
+ 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.0/HELP.md ADDED
@@ -0,0 +1,113 @@
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
+ ```
31
+
32
+ ## CLI Commands
33
+
34
+ ### Native Protocol
35
+
36
+ ```bash
37
+ vssh <host> # Interactive PTY shell
38
+ vssh shell <host> # Interactive PTY shell
39
+ vssh run <host> <command> # Execute command
40
+ vssh exec <host> <command> # Alias for native run
41
+ vssh put <local> <host:path> # Upload
42
+ vssh get <host:path> <local> # Download
43
+ ```
44
+
45
+ ### Status
46
+
47
+ ```bash
48
+ vssh status # Show dashboard
49
+ vssh list # List all peers
50
+ vssh version # Show version
51
+ ```
52
+
53
+ ## Data Sources
54
+
55
+ VSSH discovers peers from multiple sources:
56
+
57
+ 1. Wire VPN coordinator
58
+ 2. Tailscale
59
+ 3. Config file (~/.vssh/servers.json)
60
+ 4. Cache
61
+
62
+ ## Configuration
63
+
64
+ ### Server Config
65
+
66
+ `~/.vssh/servers.json`:
67
+
68
+ ```json
69
+ {
70
+ "web1": {"ip": "192.0.2.10", "user": "deploy"},
71
+ "db1": {"ip": "192.0.2.20", "user": "postgres"}
72
+ }
73
+ ```
74
+
75
+ ### User Mapping
76
+
77
+ Per-host SSH user overrides are read from Wire’s config directory (same as the Wire CLI), not under `~/.vssh/`:
78
+
79
+ - Non-root: `~/.wire/users.json`
80
+ - Root: `/etc/wire/users.json`
81
+
82
+ Example (`~/.wire/users.json`):
83
+
84
+ ```json
85
+ {
86
+ "web1": "deploy",
87
+ "db1": "postgres"
88
+ }
89
+ ```
90
+
91
+ ## Environment Variables
92
+
93
+ | Variable | Description |
94
+ |----------|-------------|
95
+ | `VSSH_SECRET` | Primary shared secret for native protocol (set on client and server). |
96
+ | `VSSH_PORT` | Native server listen port (default: **48291**). |
97
+ | `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). |
98
+ | `VSSH_INSECURE_ALLOW_EMPTY_SECRET` | Set to `1` **only in isolated labs** to allow a native server with no secret (unsafe). |
99
+
100
+ ## Security
101
+
102
+ - **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.
103
+ - VSSH does not expose an OpenSSH wrapper command. Use `ssh` directly for normal sshd-backed shell access.
104
+ - **`internal/adapter`**: discovery / `Probe` only; `Exec` is not implemented. Use native server commands for product execution.
105
+
106
+ ## Architecture
107
+
108
+ | Package | Purpose |
109
+ |---------|---------|
110
+ | `internal/server` | Native protocol server and client |
111
+ | `internal/ssh` | Discovery helper and legacy internal connector |
112
+ | `internal/adapter` | Config-based node discovery and probing (Exec not implemented) |
113
+ | `internal/agent` | Monitoring agent with event logging |
vssh-4.2.0/Makefile ADDED
@@ -0,0 +1,36 @@
1
+ VERSION := 0.7.4
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