@runneth/cli 0.0.0-sha.3142666bf4dc.production

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.
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@runneth/cli",
3
+ "version": "0.0.0-sha.3142666bf4dc.production",
4
+ "type": "module",
5
+ "description": "Fast persistent local shell sessions for coding agents",
6
+ "license": "UNLICENSED",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Motion-Creative/agent-builder.git"
10
+ },
11
+ "homepage": "https://github.com/Motion-Creative/agent-builder",
12
+ "bugs": {
13
+ "url": "https://github.com/Motion-Creative/agent-builder/issues"
14
+ },
15
+ "engines": {
16
+ "node": ">=24.0.0"
17
+ },
18
+ "bin": {
19
+ "runneth-cli": "dist/cli.js"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public",
23
+ "registry": "https://registry.npmjs.org"
24
+ },
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/index.d.ts",
28
+ "default": "./dist/index.js"
29
+ },
30
+ "./package.json": "./package.json"
31
+ },
32
+ "types": "./dist/index.d.ts",
33
+ "files": [
34
+ "dist",
35
+ "README.md",
36
+ "skills"
37
+ ]
38
+ }
@@ -0,0 +1,177 @@
1
+ ---
2
+ name: runneth
3
+ description: Connect to and inspect Runneth sandboxes from Codex or Claude Code using the OAuth Runneth CLI. Use whenever the user says runneth in an operational context, asks to SSH into a Runneth VM or sandbox, configure Runneth CLI targets, run commands in a VM, keep a persistent SSH control process, install Runneth SSH access, or reason about the /agent, /runneth, /daemon, and runtime SSH layout.
4
+ ---
5
+
6
+ # Runneth
7
+
8
+ ## Default Transport
9
+
10
+ Use the Runneth CLI OAuth SSH flow for normal runtime access.
11
+
12
+ The CLI handles OAuth login, token refresh, Runneth key generation, public-key install, SSH config, and the SSH tunnel. For normal runtime SSH, use the CLI path exclusively.
13
+
14
+ Use Azure, daemon APIs, Datadog, or direct host administration only when the user explicitly asks for fleet, VM, image, daemon, or control-plane debugging, or when the CLI path itself is being debugged.
15
+
16
+ ## CLI Package
17
+
18
+ Use the package spec the user gives you when one is provided. By default, use the public npm package:
19
+
20
+ ```bash
21
+ npx @runneth/cli ...
22
+ ```
23
+
24
+ If the package is already installed on PATH, use `runneth-cli ...`.
25
+
26
+ ## Targets
27
+
28
+ A target stores the OAuth resource URL and the SSH app URL for a VM.
29
+
30
+ Add a target from a full host:
31
+
32
+ ```bash
33
+ runneth-cli ssh target add <target-name> \
34
+ --host <full-host> \
35
+ --default
36
+ ```
37
+
38
+ `--host` is the entire host. Do not infer or append a suffix. If the user gives the complete SSH app URL, use `--ssh-url`:
39
+
40
+ ```bash
41
+ runneth-cli ssh target add <target-name> \
42
+ --ssh-url https://<full-host>/runneth/ssh \
43
+ --default
44
+ ```
45
+
46
+ List and select targets:
47
+
48
+ ```bash
49
+ runneth-cli ssh target list
50
+ runneth-cli ssh target use <target-name>
51
+ ```
52
+
53
+ Import multiple targets from JSON:
54
+
55
+ ```bash
56
+ runneth-cli ssh target import ./runneth-targets.json
57
+ ```
58
+
59
+ Example import file:
60
+
61
+ ```json
62
+ {
63
+ "resourceUrl": "https://projects.motionapp.com/mcp",
64
+ "defaultTarget": "primary",
65
+ "targets": [
66
+ {
67
+ "name": "primary",
68
+ "host": "e0da08e2-cf18-457f-80e3-48745967dedf.app.runneth.com"
69
+ },
70
+ {
71
+ "name": "worker",
72
+ "sshUrl": "https://example.internal/runneth/ssh"
73
+ }
74
+ ]
75
+ }
76
+ ```
77
+
78
+ ## Commands
79
+
80
+ Run a one-off command:
81
+
82
+ ```bash
83
+ runneth-cli ssh --target <target-name> -- 'whoami && pwd && hostname'
84
+ ```
85
+
86
+ Open an interactive shell:
87
+
88
+ ```bash
89
+ runneth-cli ssh --target <target-name>
90
+ ```
91
+
92
+ The public HTTP tunnel can have noticeable per-keystroke latency. For agents or sequential command work, prefer one-off commands or stdio mode.
93
+
94
+ ## Agent Stdio Mode
95
+
96
+ Use stdio mode for Claude Code, Codex, and other agents that need to keep one SSH session available without reopening SSH for every command.
97
+
98
+ Start the process:
99
+
100
+ ```bash
101
+ runneth-cli ssh stdio --target <target-name>
102
+ ```
103
+
104
+ Send one JSON request per line on stdin and read one JSON event per line on stdout.
105
+
106
+ One-off command:
107
+
108
+ ```json
109
+ {
110
+ "id": "1",
111
+ "method": "exec",
112
+ "params": { "command": "pwd && ls -la", "timeoutMs": 600000 }
113
+ }
114
+ ```
115
+
116
+ Spawn a persistent process and write to it:
117
+
118
+ ```json
119
+ {"id":"2","method":"spawn","params":{"command":"bash"}}
120
+ {"id":"2","method":"stdin","params":{"data":"pwd\n"}}
121
+ {"id":"2","method":"stdin","params":{"data":"exit\n"}}
122
+ ```
123
+
124
+ Other supported requests:
125
+
126
+ ```json
127
+ {"id":"5","method":"list"}
128
+ {"id":"2","method":"signal","params":{"signal":"SIGINT"}}
129
+ {"id":"2","method":"close"}
130
+ {"id":"7","method":"ping"}
131
+ ```
132
+
133
+ For `spawn`, the request `id` is the process id. Use the same `id` for that process's `stdin`, `signal`, and `close` requests.
134
+
135
+ Keep the stdio process open for the duration of a task. Do not repeatedly reopen SSH for a sequence of commands unless the stdio process is unavailable.
136
+
137
+ ## Auth And Keys
138
+
139
+ The CLI uses OAuth. On first use it opens a browser or prints an authorization URL; the user must complete that login. Use CLI flags such as `--no-open` only when browser opening is not possible.
140
+
141
+ The CLI generates one shared default Runneth key pair and reuses it across targets by default. The public key is installed into the VM through the OAuth-protected SSH app API.
142
+
143
+ Use `--unique-key` when the user wants a separate key for one target. Use `--identity-file <path>` when the user provides an existing private key and matching public key.
144
+
145
+ The default OAuth resource should be baked into the published CLI from `MONDRIAN_API_URL/mcp`. If a package was built without the correct default, pass `--resource https://projects.motionapp.com/mcp` explicitly and treat that as a package/build issue to fix.
146
+
147
+ ## Runtime Filesystem
148
+
149
+ Runtime SSH enters as the `runneth-ssh` user.
150
+
151
+ Useful paths inside a Runneth VM:
152
+
153
+ - `/agent` - workspace shared with the runtime.
154
+ - `/agent/.runtime` - runtime-owned state.
155
+ - `/daemon` - process-daemon HTTP API and runtime controls.
156
+ - `/daemon/ssh/authorized_keys` - Runneth SSH authorized keys on the VM OS disk.
157
+ - `/runneth` - app code and app_core runtime.
158
+
159
+ ## Validation
160
+
161
+ For a smoke test, run:
162
+
163
+ ```bash
164
+ runneth-cli ssh --target <target-name> -- 'printf "user=%s pwd=%s host=%s\n" "$(whoami)" "$(pwd)" "$(hostname)"'
165
+ ```
166
+
167
+ Expected result: the command exits successfully, the user is usually `runneth-ssh`, and the VM hostname is returned.
168
+
169
+ ## Troubleshooting
170
+
171
+ Common failures:
172
+
173
+ - `401` or `403`: OAuth is missing, expired, or the user does not have access to the VM organization.
174
+ - `404` for `/api/tunnels`: app_core is stale or the SSH app route is not deployed.
175
+ - `405` for `/api/keys`: the SSH app is stale and does not expose the public-key install API.
176
+ - `503`: public app routing, daemon health, runtime app startup, or the tunnel limit is blocking access.
177
+ - Slow interactive typing: expected HTTP tunnel latency; switch to `ssh stdio` or one-off commands.