premanmcp 0.9.0 → 0.10.1
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 +49 -11
- package/bin/account.js +1 -1
- package/bin/api_tools.js +2 -2
- package/bin/cli.js +5 -1
- package/bin/connect.js +732 -68
- package/bin/hook.js +16 -4
- package/bin/integrations.js +46 -25
- package/bin/runner.js +946 -0
- package/bin/shared.js +65 -6
- package/dist/server.js +30 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -42,19 +42,39 @@ Claude Code's MCP config, or `~/.codex/config.toml`):
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
`connect` reads the config back after writing it, and prints a copy-paste snippet if it
|
|
45
|
-
cannot confirm the entry landed.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
cannot confirm the entry landed. Then it finishes the link itself rather than asking you
|
|
46
|
+
to go restart anything, in cheapest-first order:
|
|
47
|
+
|
|
48
|
+
1. **Self-test.** It starts the MCP server exactly as your agent will and calls
|
|
49
|
+
`preman_status` over stdio. That both completes the link and proves the whole chain —
|
|
50
|
+
launcher, package, key, backend. `--no-self-test` turns it off.
|
|
51
|
+
2. **Headless agent run** (`claude -p`, `cursor-agent -p`, `codex exec`), which also
|
|
52
|
+
proves your agent can load what was written. `--no-auto-checkin` turns it off.
|
|
53
|
+
3. **Wait**, if neither is possible: restart your agent and it links on its first call.
|
|
54
|
+
|
|
55
|
+
A self-test that answers from an unexpected backend is reported with the file that
|
|
56
|
+
redirected it — a repo-local `preman-mcp.config.json` with `"PREMAN_CONFIG_OVERRIDE": true`
|
|
57
|
+
wins over the MCP config env, and otherwise only fills in what the env leaves unset.
|
|
58
|
+
|
|
59
|
+
Once linked, `connect` finishes onboarding without handing you homework:
|
|
60
|
+
|
|
61
|
+
| Step | What happens |
|
|
62
|
+
|------|--------------|
|
|
63
|
+
| Endpoints | Runs your agent on the discovery brief, then reports `N endpoints · M runnable` |
|
|
64
|
+
| First test | Generates and runs scenarios against the first runnable request |
|
|
65
|
+
| Runner | Pairs this machine and starts `preman runner` in the background, so PreMan can apply fixes here instead of only describing them |
|
|
66
|
+
| Desktop app | Offers the macOS app for watching runs and endpoints |
|
|
67
|
+
| Integrations | Shows GitHub / AWS / Slack, opens what is missing, and picks the connection up when you finish in the browser or the desktop app |
|
|
68
|
+
| Testing on push | Installs the git pre-push hook, so `git push` checks the endpoints you touched |
|
|
54
69
|
|
|
55
70
|
Useful flags: `--agent cursor|claude-code|codex` skips the picker, `--project` writes
|
|
56
|
-
project-local config, `--print` shows the config without writing it, `--
|
|
57
|
-
|
|
71
|
+
project-local config, `--print` shows the config without writing it, `--yes` takes every
|
|
72
|
+
step's default without asking, `--no-guide` skips all of them, and `--no-runner` /
|
|
73
|
+
`--no-desktop` / `--no-integrations` / `--no-hook` skip one each.
|
|
74
|
+
|
|
75
|
+
`--yes` deliberately does *not* install the desktop app: that step's default is no, because
|
|
76
|
+
it downloads a hundred-odd megabytes and writes to `/Applications`. Run `install-desktop`
|
|
77
|
+
when you want it.
|
|
58
78
|
|
|
59
79
|
In CI or any non-interactive shell, run `connect --agent <name> --api-key pm_live_…`.
|
|
60
80
|
Without `--agent` there is nothing to prompt on, so `connect` prints ready-to-paste
|
|
@@ -190,6 +210,24 @@ npm exec -y premanmcp@latest -- login # Create/login and generate a PreMan API
|
|
|
190
210
|
npm exec -y premanmcp@latest -- install # Cursor-only installer (legacy)
|
|
191
211
|
```
|
|
192
212
|
|
|
213
|
+
### Runner
|
|
214
|
+
|
|
215
|
+
`connect` sets this up for you; these are for managing it afterwards.
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
preman runner status # Paired? Running?
|
|
219
|
+
preman runner start --background # Hold the job stream, log to ~/.preman/runner.log
|
|
220
|
+
preman runner stop # Stop it and report offline
|
|
221
|
+
preman runner register --agent claude-code # Re-pair (e.g. a different project)
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
The runner holds one outbound connection to PreMan and runs the work PreMan queues for
|
|
225
|
+
this machine — a failing endpoint becomes an agent run in your own repo instead of a
|
|
226
|
+
prompt you have to paste. It is bound to the agent and directory it was registered with
|
|
227
|
+
and refuses any job that names a different one. The agent may edit files; running commands
|
|
228
|
+
needs `--full-access` (or `PREMAN_RUNNER_FULL_ACCESS=1`). Nothing runs until PreMan has
|
|
229
|
+
something to fix, and `preman runner stop` ends it.
|
|
230
|
+
|
|
193
231
|
Options:
|
|
194
232
|
|
|
195
233
|
- `--api-key <key>`: PreMan API key.
|
package/bin/account.js
CHANGED
|
@@ -178,7 +178,7 @@ export async function watchCommand(commandArgs = []) {
|
|
|
178
178
|
const integrationId = args.value("--integration", positional[1] || "");
|
|
179
179
|
if (!runId || !integrationId) {
|
|
180
180
|
throw new Error(
|
|
181
|
-
|
|
181
|
+
`usage: watch <run-id> <integration-id> (both are shown by \`${cliInvocation()} status\`)`
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
184
|
|
package/bin/api_tools.js
CHANGED
|
@@ -45,7 +45,7 @@ export async function callTool(args, tool, toolArguments) {
|
|
|
45
45
|
const token = resolveApiKey(args);
|
|
46
46
|
if (!token) {
|
|
47
47
|
throw new CliError(
|
|
48
|
-
|
|
48
|
+
`No PreMan API key. Run \`${cliInvocation()} login\` or pass --api-key pm_live_...`,
|
|
49
49
|
2,
|
|
50
50
|
);
|
|
51
51
|
}
|
|
@@ -110,7 +110,7 @@ export async function endpointsCommand(commandArgs) {
|
|
|
110
110
|
if (args.has("--json-out")) return printJson(result);
|
|
111
111
|
for (const line of result.instructions || []) process.stdout.write(`${line}\n`);
|
|
112
112
|
process.stdout.write(
|
|
113
|
-
|
|
113
|
+
`\nHand this brief to your coding agent, then run \`${cliInvocation()} endpoints setup --file endpoints.json\`.\n`,
|
|
114
114
|
);
|
|
115
115
|
return undefined;
|
|
116
116
|
}
|
package/bin/cli.js
CHANGED
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
import { HOSTED_HELP, linkCommand, runCommand, toolsCommand } from "./hosted.js";
|
|
35
35
|
import { STATUS_HELP, statusCommand } from "./status.js";
|
|
36
36
|
import { HOOK_HELP, hookCommand } from "./hook.js";
|
|
37
|
+
import { RUNNER_HELP, runnerCommand } from "./runner.js";
|
|
37
38
|
import { VERIFY_HELP, verifyCommand } from "./verify.js";
|
|
38
39
|
import { DESKTOP_HELP, installDesktopCommand } from "./desktop.js";
|
|
39
40
|
import { ACCOUNT_HELP, doctorCommand, loginBrowser, logoutCommand, watchCommand } from "./account.js";
|
|
@@ -80,6 +81,7 @@ function printHelp() {
|
|
|
80
81
|
["status", "Healthy / failing / recently fixed endpoints"],
|
|
81
82
|
["verify [options]", "Test endpoints against your local app"],
|
|
82
83
|
["hook install|uninstall|status", "Manage the git pre-push hook"],
|
|
84
|
+
["runner start|status|stop", "Run PreMan's queued agent work on this machine"],
|
|
83
85
|
["doctor", "Diagnose credentials, backend, target, integrations"],
|
|
84
86
|
["install-desktop", "Download and install the PreMan desktop app"],
|
|
85
87
|
["onboard", "Sign in, then connect agent, GitHub, AWS, Slack"],
|
|
@@ -104,7 +106,7 @@ function printHelp() {
|
|
|
104
106
|
|
|
105
107
|
Usage:
|
|
106
108
|
${usageLines}
|
|
107
|
-
${INTEGRATIONS_HELP}${CONNECT_HELP}${DISPATCH_HELP}${STATUS_HELP}${VERIFY_HELP}${HOOK_HELP}${ACCOUNT_HELP}${DESKTOP_HELP}${ENDPOINTS_HELP}${TEST_HELP}
|
|
109
|
+
${INTEGRATIONS_HELP}${CONNECT_HELP}${DISPATCH_HELP}${STATUS_HELP}${VERIFY_HELP}${HOOK_HELP}${RUNNER_HELP}${ACCOUNT_HELP}${DESKTOP_HELP}${ENDPOINTS_HELP}${TEST_HELP}
|
|
108
110
|
Login options:
|
|
109
111
|
--email <email> Pre-fill the email prompt
|
|
110
112
|
--backend <url> PreMan backend URL. Defaults to ${DEFAULT_BACKEND}
|
|
@@ -221,6 +223,8 @@ async function main() {
|
|
|
221
223
|
await verifyCommand(commandArgs);
|
|
222
224
|
} else if (command === "hook") {
|
|
223
225
|
await hookCommand(commandArgs);
|
|
226
|
+
} else if (command === "runner") {
|
|
227
|
+
await runnerCommand(commandArgs);
|
|
224
228
|
} else if (command === "logout") {
|
|
225
229
|
await logoutCommand();
|
|
226
230
|
} else if (command === "doctor") {
|