@runneth/cli 0.0.0-sha.372b2c9d0e4f.production → 0.0.0-sha.786bc749f54f.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/README.md +47 -26
- package/dist/build-defaults.d.ts +6 -1
- package/dist/build-defaults.js +32 -17
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +1431 -1032
- package/dist/index.d.ts +382 -89
- package/dist/index.js +2 -547
- package/dist/src.js +11592 -0
- package/package.json +7 -2
- package/dist/copy.d.ts +0 -25
- package/dist/copy.js +0 -492
- package/dist/oauth.d.ts +0 -80
- package/dist/oauth.js +0 -592
- package/dist/paths.d.ts +0 -2
- package/dist/paths.js +0 -25
- package/dist/skills.d.ts +0 -15
- package/dist/skills.js +0 -89
- package/dist/ssh-stdio.d.ts +0 -63
- package/dist/ssh-stdio.js +0 -608
- package/dist/ssh.d.ts +0 -129
- package/dist/ssh.js +0 -835
package/README.md
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx @runneth/cli open
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
runneth send 'cd ~/project && pnpm test'
|
|
8
|
+
runneth send 'git status --short'
|
|
9
|
+
runneth oauth login
|
|
10
|
+
runneth chat --workspace <workspace-id>
|
|
11
|
+
runneth ssh
|
|
12
|
+
runneth close
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
## npm Usage
|
|
@@ -33,28 +34,29 @@ environment variables, and other shell state persist between commands.
|
|
|
33
34
|
## Commands
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
|
-
runneth
|
|
37
|
-
runneth
|
|
38
|
-
runneth
|
|
39
|
-
runneth
|
|
40
|
-
runneth
|
|
41
|
-
runneth
|
|
42
|
-
runneth
|
|
43
|
-
runneth
|
|
44
|
-
runneth
|
|
45
|
-
runneth
|
|
46
|
-
runneth
|
|
47
|
-
runneth
|
|
48
|
-
runneth
|
|
49
|
-
runneth
|
|
50
|
-
runneth
|
|
51
|
-
runneth
|
|
37
|
+
runneth open [--name default] [--cwd <path>] [--shell <path>]
|
|
38
|
+
runneth send [--name default] [--timeout-ms 600000] [--stdin] -- <command...>
|
|
39
|
+
runneth status [--name default]
|
|
40
|
+
runneth list
|
|
41
|
+
runneth close [--name default]
|
|
42
|
+
runneth oauth login [--resource <url>] [--client-name "Runneth MCP"] [--scope <scope>] [--no-open]
|
|
43
|
+
runneth oauth status [--resource <url>]
|
|
44
|
+
runneth oauth logout [--resource <url>]
|
|
45
|
+
runneth chat --workspace <workspace-id> [--api <builder-url>] [--resource <url>] [--auth mondrian|builder] [--conversation <id>]
|
|
46
|
+
runneth ssh target add <name> (--host <host> | --ssh-url <url>) [--resource <url>] [--default]
|
|
47
|
+
runneth ssh target import <file>
|
|
48
|
+
runneth ssh target list
|
|
49
|
+
runneth ssh target use <name>
|
|
50
|
+
runneth ssh [--target <name>] [--unique-key | --identity-file <path>] [-- remote-command]
|
|
51
|
+
runneth ssh stdio [--target <name>] [--unique-key | --identity-file <path>]
|
|
52
|
+
runneth skills install [--agent claude|codex|all]
|
|
53
|
+
runneth shutdown
|
|
52
54
|
```
|
|
53
55
|
|
|
54
56
|
Use `--stdin` for multi-line commands:
|
|
55
57
|
|
|
56
58
|
```bash
|
|
57
|
-
cat <<'SCRIPT' | runneth
|
|
59
|
+
cat <<'SCRIPT' | runneth send --stdin
|
|
58
60
|
cd ~/project
|
|
59
61
|
pnpm check
|
|
60
62
|
SCRIPT
|
|
@@ -70,14 +72,33 @@ client registration as a public MCP-style client, PKCE authorization, and token
|
|
|
70
72
|
exchange through a local loopback callback.
|
|
71
73
|
|
|
72
74
|
```bash
|
|
73
|
-
runneth
|
|
74
|
-
runneth
|
|
75
|
+
runneth oauth login --resource http://localhost:4100/mcp
|
|
76
|
+
runneth oauth status --resource http://localhost:4100/mcp
|
|
75
77
|
```
|
|
76
78
|
|
|
77
79
|
OAuth credentials are stored under `~/.runneth-cli/oauth` with user-only file
|
|
78
80
|
permissions on Unix-like systems. Commands that need an access token refresh it
|
|
79
81
|
internally when the server issued a refresh token.
|
|
80
82
|
|
|
83
|
+
## Chat
|
|
84
|
+
|
|
85
|
+
`runneth-cli chat` starts an interactive terminal conversation against Builder's
|
|
86
|
+
canonical Runneth conversation API. Official environment builds carry the
|
|
87
|
+
correct Builder URL in the package; use `--api` only for local or custom Builder
|
|
88
|
+
deployments.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
runneth chat --workspace "$MONDRIAN_WORKSPACE_ID"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If no stored OAuth credential exists, chat starts the same browser-based OAuth
|
|
95
|
+
flow as SSH and stores the credential under `~/.runneth-cli/oauth`. Use
|
|
96
|
+
`--token`, `RUNNETH_TOKEN`, `MONDRIAN_TOKEN`, or `BUILDER_AGENT_CHAT_TOKEN` only
|
|
97
|
+
for automation and local API mocks that should bypass OAuth.
|
|
98
|
+
|
|
99
|
+
Inside the terminal UI, use `/state` to redraw the current conversation and
|
|
100
|
+
`/exit` to quit.
|
|
101
|
+
|
|
81
102
|
## SSH
|
|
82
103
|
|
|
83
104
|
`runneth-cli ssh` uses the stored OAuth credential for the resource. If no
|
|
@@ -87,7 +108,7 @@ public key to the Runneth SSH app, writes an isolated OpenSSH config, and then
|
|
|
87
108
|
starts `ssh` through the app tunnel.
|
|
88
109
|
|
|
89
110
|
```bash
|
|
90
|
-
runneth
|
|
111
|
+
runneth ssh \
|
|
91
112
|
--resource https://projects.motionapp.com/mcp \
|
|
92
113
|
--host 93c7ca56-debe-4b95-8be2-a873afe72234.app.runneth.com
|
|
93
114
|
```
|
|
@@ -103,7 +124,7 @@ Use `ssh stdio` when an agent needs to keep one authenticated SSH connection
|
|
|
103
124
|
open and run multiple commands or remote processes without reconnecting:
|
|
104
125
|
|
|
105
126
|
```bash
|
|
106
|
-
runneth
|
|
127
|
+
runneth ssh stdio --target primary-vm
|
|
107
128
|
```
|
|
108
129
|
|
|
109
130
|
The command writes JSONL events to stdout and reads JSONL requests from stdin.
|
package/dist/build-defaults.d.ts
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/build-defaults.d.ts
|
|
2
|
+
declare const resolveBuildDefaultMcpResourceUrl: () => string | undefined;
|
|
3
|
+
declare const resolveBuildDefaultMondrianApiUrl: () => string | undefined;
|
|
4
|
+
declare const resolveBuildDefaultRunnethApiUrl: () => string | undefined;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { resolveBuildDefaultMcpResourceUrl, resolveBuildDefaultMondrianApiUrl, resolveBuildDefaultRunnethApiUrl };
|
package/dist/build-defaults.js
CHANGED
|
@@ -1,21 +1,36 @@
|
|
|
1
|
+
//#region src/build-defaults.ts
|
|
1
2
|
const BUILD_DEFAULT_MONDRIAN_API_URL = "https://projects.motionapp.com/";
|
|
2
|
-
const
|
|
3
|
+
const BUILD_DEFAULT_RUNNETH_API_URL = "https://build-be.runneth.com/";
|
|
3
4
|
const appendMcpPath = (url) => {
|
|
4
|
-
|
|
5
|
-
url.pathname = `${basePath}/mcp`;
|
|
5
|
+
url.pathname = `${url.pathname === "/" ? "" : url.pathname.replace(/\/+$/u, "")}/mcp`;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const url = new URL(rawApiUrl);
|
|
14
|
-
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
15
|
-
throw new Error("Build default MONDRIAN_API_URL must use http or https");
|
|
16
|
-
}
|
|
17
|
-
url.hash = "";
|
|
18
|
-
url.search = "";
|
|
19
|
-
appendMcpPath(url);
|
|
20
|
-
return url.toString();
|
|
7
|
+
const resolveBuildDefaultMcpResourceUrl = () => {
|
|
8
|
+
const apiUrl = resolveBuildDefaultMondrianApiUrl();
|
|
9
|
+
if (apiUrl === void 0) return;
|
|
10
|
+
const url = new URL(apiUrl);
|
|
11
|
+
appendMcpPath(url);
|
|
12
|
+
return url.toString();
|
|
21
13
|
};
|
|
14
|
+
const normalizeBuildDefaultUrl = (input) => {
|
|
15
|
+
const rawApiUrl = input.value.trim();
|
|
16
|
+
if (rawApiUrl.length === 0 || rawApiUrl.startsWith("__RUNNETH_CLI_DEFAULT_") && rawApiUrl.endsWith("_API_URL__")) return;
|
|
17
|
+
const url = new URL(rawApiUrl);
|
|
18
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") throw new Error(`Build default ${input.envName} must use http or https`);
|
|
19
|
+
url.hash = "";
|
|
20
|
+
url.search = "";
|
|
21
|
+
return url.toString().replace(/\/+$/u, "");
|
|
22
|
+
};
|
|
23
|
+
const resolveBuildDefaultMondrianApiUrl = () => {
|
|
24
|
+
return normalizeBuildDefaultUrl({
|
|
25
|
+
envName: "MONDRIAN_API_URL",
|
|
26
|
+
value: BUILD_DEFAULT_MONDRIAN_API_URL
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
const resolveBuildDefaultRunnethApiUrl = () => {
|
|
30
|
+
return normalizeBuildDefaultUrl({
|
|
31
|
+
envName: "BACKEND_URL",
|
|
32
|
+
value: BUILD_DEFAULT_RUNNETH_API_URL
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { resolveBuildDefaultMcpResourceUrl, resolveBuildDefaultMondrianApiUrl, resolveBuildDefaultRunnethApiUrl };
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export {};
|
|
1
|
+
export { };
|