@vibecodr/cli 1.0.7 → 1.0.9
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/CHANGELOG.md +9 -0
- package/README.md +31 -11
- package/dist/app/command-registry.d.ts +13 -0
- package/dist/app/command-registry.d.ts.map +1 -0
- package/dist/app/command-registry.js +54 -0
- package/dist/app/command-registry.js.map +1 -0
- package/dist/app/help.d.ts +5 -0
- package/dist/app/help.d.ts.map +1 -0
- package/dist/app/help.js +158 -0
- package/dist/app/help.js.map +1 -0
- package/dist/bin/vibecodr-mcp.js +82 -89
- package/dist/bin/vibecodr-mcp.js.map +1 -1
- package/dist/commands/context.d.ts +2 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +81 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/feedback.d.ts +3 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +92 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +14 -0
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +29 -4
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts.map +1 -1
- package/dist/commands/logout.js +25 -3
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +26 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +78 -6
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/tools.js +2 -2
- package/dist/commands/tools.js.map +1 -1
- package/dist/legacy/cli/run.js +36 -1
- package/dist/legacy/cli/run.js.map +1 -1
- package/dist/legacy/core/version.d.ts +2 -2
- package/dist/legacy/core/version.js +1 -1
- package/docs/API-CONTRACT.md +18 -1
- package/docs/RELEASE-CHECKLIST.md +11 -7
- package/docs/SECURITY.md +10 -6
- package/docs/VALIDATION-MATRIX.md +5 -5
- package/docs/architecture.md +9 -6
- package/docs/auth.md +15 -7
- package/docs/commands.md +44 -18
- package/docs/install.md +5 -5
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Pre-1.0.0 history for the `@vibecodr/cli@0.2.x` and `0.1.x` lines lives at [`docs/legacy/CHANGELOG-mcp-cli.md`](docs/legacy/CHANGELOG-mcp-cli.md). The `@vibecodr/vc-tools@0.1.x` line was the other half of the May 2026 merge; its source history is preserved in the archived [`BradenHartsell/vc-tools`](https://github.com/BradenHartsell/vc-tools) repository.
|
|
4
4
|
|
|
5
|
+
## 1.0.9
|
|
6
|
+
|
|
7
|
+
Fixes the hosted Agent Computer MCP auth contract at `tools.vibecodr.space/mcp`.
|
|
8
|
+
|
|
9
|
+
- `src/hosted/worker.ts`: publishes OAuth protected-resource metadata for `/mcp`, includes `WWW-Authenticate` resource metadata and scope hints on unauthenticated MCP POSTs, returns unauthenticated 404s for authorization-server discovery probes on the tools host, and keeps those discovery probes out of `auth.failed` anomaly metrics.
|
|
10
|
+
- `src/legacy/cli/run.ts`: stops `vibecodr agent connect --client <editor>` from writing or printing bare named-client configs for `tools.vibecodr.space/mcp` until a supported `vc_tools` client auth flow is proven. The Agent Computer CLI credential lane remains available through `vibecodr start`, `vibecodr try`, and direct CLI commands.
|
|
11
|
+
- `src/commands/install.ts`: refuses `vibecodr install <client>` when the active MCP profile points at `tools.vibecodr.space/mcp`; `install` is for the OAuth-backed MCP Gateway profile, normally `https://openai.vibecodr.space/mcp`.
|
|
12
|
+
- Docs and tests now lock the separation between the MCP Gateway OAuth lane and the hosted Agent Computer `vc_tools` grant lane.
|
|
13
|
+
|
|
5
14
|
## 1.0.7
|
|
6
15
|
|
|
7
16
|
Verbiage and discoverability cleanup driven by user reports on 1.0.6.
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The official Vibecodr CLI. One package, one install command, one coherent surfac
|
|
|
8
8
|
- Hosted computer tools (run, test, work follow, work submit, proof).
|
|
9
9
|
- Capsule uploads (zip + image) into Pulse and the hosted MCP gateway.
|
|
10
10
|
- Pulse lifecycle (setup, publish, list, get, status, run, archive, restore, create, deploy).
|
|
11
|
-
-
|
|
11
|
+
- Adding Vibecodr to the apps people actually use: Codex, Cursor, VS Code, Windsurf, Claude Desktop, and Claude Code.
|
|
12
12
|
- Direct OAuth login, device-code login, status, doctor, diagnostics.
|
|
13
13
|
|
|
14
14
|
## Install
|
|
@@ -37,29 +37,49 @@ npm install -g @vibecodr/cli@1.0.0
|
|
|
37
37
|
|
|
38
38
|
## Quick start
|
|
39
39
|
|
|
40
|
+
If you are not sure what you need yet, start here:
|
|
41
|
+
|
|
40
42
|
```bash
|
|
41
|
-
|
|
42
|
-
vibecodr
|
|
43
|
+
vibecodr status
|
|
44
|
+
vibecodr doctor
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The default human experience is intentionally simple: the CLI should tell you
|
|
48
|
+
what is connected, what is missing, and the next command to run. The underlying
|
|
49
|
+
surfaces stay explicit for scripting, debugging, and release verification.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# 1. Sign in for publishing, uploads, Pulses, and MCP Gateway tools.
|
|
53
|
+
vibecodr login
|
|
43
54
|
|
|
44
|
-
# 2.
|
|
45
|
-
|
|
55
|
+
# 2. Add Vibecodr to Codex. Other supported apps: Cursor, VS Code, Windsurf,
|
|
56
|
+
# Claude Desktop, and Claude Code.
|
|
57
|
+
vibecodr install codex
|
|
46
58
|
|
|
47
|
-
# 3.
|
|
48
|
-
vibecodr
|
|
59
|
+
# 3. Set up the hosted Agent Computer when you want browser/computer work.
|
|
60
|
+
vibecodr start
|
|
49
61
|
vibecodr browser screenshot https://example.com --out ./proof
|
|
50
62
|
```
|
|
51
63
|
|
|
64
|
+
Power users and automation should prefer the explicit surfaces and stable JSON:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
vibecodr mcp tools --json --non-interactive
|
|
68
|
+
vibecodr mcp call get_account_capabilities --input-json '{}' --json --non-interactive
|
|
69
|
+
vibecodr status --json --non-interactive
|
|
70
|
+
```
|
|
71
|
+
|
|
52
72
|
## Surfaces
|
|
53
73
|
|
|
54
74
|
The CLI talks to two hosted endpoints. Every command targets exactly one of them:
|
|
55
75
|
|
|
56
76
|
| Endpoint | Commands |
|
|
57
77
|
|---|---|
|
|
58
|
-
| `tools.vibecodr.space` | `start`, `setup`, `agent`, `connect`, `try`, `browser`, `computer`, `work`, `proof`, `jobs`, `artifacts`, `usage`, `limits`, `grants`, `retention`, `scheduled-qa`, `plans`, `dashboard`, `inspect` |
|
|
59
|
-
| `openai.vibecodr.space/mcp` | `tools`, `call`, `upload`, `pulse`, `pulse-setup`, `pulse-publish` |
|
|
60
|
-
|
|
|
78
|
+
| `tools.vibecodr.space` | `start`, `setup`, `login agent`, `logout agent`, `agent`, `connect`, `try`, `browser`, `computer`, `work`, `proof`, `jobs`, `artifacts`, `usage`, `limits`, `grants`, `retention`, `scheduled-qa`, `plans`, `dashboard`, `inspect` |
|
|
79
|
+
| `openai.vibecodr.space/mcp` | `login mcp`, `logout mcp`, `mcp tools`, `mcp call`, `tools`, `call`, `feedback`, `upload`, `pulse`, `pulse-setup`, `pulse-publish`, `whoami` |
|
|
80
|
+
| Shared local diagnostics/install | `status`, `doctor`, `install`, `uninstall`, `config` |
|
|
61
81
|
|
|
62
|
-
CLI auth is independent of the auth your editor (Codex, Cursor, VS Code, Windsurf, Claude Desktop, Claude Code) negotiates with the gateway; each client owns its own session.
|
|
82
|
+
CLI auth is independent of the auth your editor (Codex, Cursor, VS Code, Windsurf, Claude Desktop, Claude Code) negotiates with the gateway; each client owns its own session. `vibecodr login` defaults to the MCP Gateway lane. Use `vibecodr login agent` for the hosted Agent Computer credential lane.
|
|
63
83
|
|
|
64
84
|
## Migrating from `@vibecodr/vc-tools@0.1.x` or `@vibecodr/cli@0.2.x`
|
|
65
85
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type CommandSurface = "shared" | "agent-computer" | "mcp-gateway" | "compatibility";
|
|
2
|
+
export interface CommandDefinition {
|
|
3
|
+
name: string;
|
|
4
|
+
surface: CommandSurface;
|
|
5
|
+
summary: string;
|
|
6
|
+
preferred?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare const COMMAND_REGISTRY: readonly CommandDefinition[];
|
|
9
|
+
export declare const AGENT_COMPUTER_COMMANDS: Set<string>;
|
|
10
|
+
export declare const MCP_GATEWAY_COMMANDS: Set<string>;
|
|
11
|
+
export declare function findCommandDefinition(name: string | undefined): CommandDefinition | undefined;
|
|
12
|
+
export declare function commandNamesForSurface(surface: CommandSurface): string[];
|
|
13
|
+
//# sourceMappingURL=command-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-registry.d.ts","sourceRoot":"","sources":["../../src/app/command-registry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,gBAAgB,GAAG,aAAa,GAAG,eAAe,CAAC;AAE3F,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,gBAAgB,EAAE,SAAS,iBAAiB,EAwCxD,CAAC;AAEF,eAAO,MAAM,uBAAuB,aAGnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,aAGhC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,iBAAiB,GAAG,SAAS,CAG7F;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,EAAE,CAIxE"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export const COMMAND_REGISTRY = [
|
|
2
|
+
{ name: "login", surface: "shared", summary: "Authorize the CLI against Vibecodr surfaces." },
|
|
3
|
+
{ name: "logout", surface: "shared", summary: "Clear stored Vibecodr CLI credentials." },
|
|
4
|
+
{ name: "status", surface: "shared", summary: "Show MCP Gateway and Agent Computer credential state." },
|
|
5
|
+
{ name: "whoami", surface: "mcp-gateway", summary: "Show the connected Vibecodr account from the MCP Gateway." },
|
|
6
|
+
{ name: "doctor", surface: "shared", summary: "Diagnose gateway, install, and hosted readiness." },
|
|
7
|
+
{ name: "install", surface: "shared", summary: "Install the MCP gateway into an agent client." },
|
|
8
|
+
{ name: "uninstall", surface: "shared", summary: "Remove a managed MCP client install." },
|
|
9
|
+
{ name: "config", surface: "shared", summary: "Manage local CLI profiles and configuration." },
|
|
10
|
+
{ name: "update", surface: "shared", summary: "Check or run CLI package updates." },
|
|
11
|
+
{ name: "feedback", surface: "shared", summary: "Send product feedback straight to the Vibecodr dev." },
|
|
12
|
+
{ name: "start", surface: "agent-computer", summary: "Connect and verify the hosted Agent Computer." },
|
|
13
|
+
{ name: "setup", surface: "agent-computer", summary: "Compatibility alias for start.", preferred: "start" },
|
|
14
|
+
{ name: "try", surface: "agent-computer", summary: "Run a small Agent Computer end-to-end check." },
|
|
15
|
+
{ name: "agent", surface: "agent-computer", summary: "Connect an agent to the hosted computer." },
|
|
16
|
+
{ name: "auth", surface: "agent-computer", summary: "Diagnose or export Agent Computer credentials." },
|
|
17
|
+
{ name: "connect", surface: "agent-computer", summary: "Compatibility alias for agent connect.", preferred: "agent connect" },
|
|
18
|
+
{ name: "computer", surface: "agent-computer", summary: "Run hosted computer commands." },
|
|
19
|
+
{ name: "browser", surface: "agent-computer", summary: "Render, read, screenshot, crawl, or inspect public HTTPS pages." },
|
|
20
|
+
{ name: "work", surface: "agent-computer", summary: "List, follow, show, or cancel hosted work." },
|
|
21
|
+
{ name: "proof", surface: "agent-computer", summary: "List, show, save, or delete hosted artifacts." },
|
|
22
|
+
{ name: "usage", surface: "agent-computer", summary: "Show Agent Computer capacity and quota progress." },
|
|
23
|
+
{ name: "limits", surface: "agent-computer", summary: "Compatibility alias for usage.", preferred: "usage" },
|
|
24
|
+
{ name: "dashboard", surface: "agent-computer", summary: "Print the hosted supervision dashboard URL." },
|
|
25
|
+
{ name: "jobs", surface: "compatibility", summary: "Compatibility alias for work.", preferred: "work" },
|
|
26
|
+
{ name: "artifacts", surface: "compatibility", summary: "Compatibility alias for proof.", preferred: "proof" },
|
|
27
|
+
{ name: "grants", surface: "agent-computer", summary: "Show effective Agent Computer grants." },
|
|
28
|
+
{ name: "retention", surface: "agent-computer", summary: "Show or update hosted retention policy." },
|
|
29
|
+
{ name: "scheduled-qa", surface: "agent-computer", summary: "Manage scheduled browser checks." },
|
|
30
|
+
{ name: "plans", surface: "agent-computer", summary: "Show Agent Computer plan details." },
|
|
31
|
+
{ name: "inspect", surface: "compatibility", summary: "Show legacy goal-coverage inspections." },
|
|
32
|
+
{ name: "mcp", surface: "mcp-gateway", summary: "Use the Vibecodr MCP Gateway namespace." },
|
|
33
|
+
{ name: "tools", surface: "mcp-gateway", summary: "Compatibility alias for mcp tools.", preferred: "mcp tools" },
|
|
34
|
+
{ name: "call", surface: "mcp-gateway", summary: "Compatibility alias for mcp call.", preferred: "mcp call" },
|
|
35
|
+
{ name: "upload", surface: "mcp-gateway", summary: "Upload capsule archives or image assets through the MCP gateway." },
|
|
36
|
+
{ name: "pulse-setup", surface: "mcp-gateway", summary: "Prepare a standalone Pulse descriptor." },
|
|
37
|
+
{ name: "pulse-publish", surface: "mcp-gateway", summary: "Publish a standalone Pulse." },
|
|
38
|
+
{ name: "pulse", surface: "mcp-gateway", summary: "Manage Pulse lifecycle operations." }
|
|
39
|
+
];
|
|
40
|
+
export const AGENT_COMPUTER_COMMANDS = new Set(COMMAND_REGISTRY.filter((command) => command.surface === "agent-computer" || command.surface === "compatibility")
|
|
41
|
+
.map((command) => command.name));
|
|
42
|
+
export const MCP_GATEWAY_COMMANDS = new Set(COMMAND_REGISTRY.filter((command) => command.surface === "mcp-gateway")
|
|
43
|
+
.map((command) => command.name));
|
|
44
|
+
export function findCommandDefinition(name) {
|
|
45
|
+
if (!name)
|
|
46
|
+
return undefined;
|
|
47
|
+
return COMMAND_REGISTRY.find((command) => command.name === name);
|
|
48
|
+
}
|
|
49
|
+
export function commandNamesForSurface(surface) {
|
|
50
|
+
return COMMAND_REGISTRY
|
|
51
|
+
.filter((command) => command.surface === surface)
|
|
52
|
+
.map((command) => command.name);
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=command-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-registry.js","sourceRoot":"","sources":["../../src/app/command-registry.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,gBAAgB,GAAiC;IAC5D,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,8CAA8C,EAAE;IAC7F,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,wCAAwC,EAAE;IACxF,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,uDAAuD,EAAE;IACvG,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,2DAA2D,EAAE;IAChH,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,kDAAkD,EAAE;IAClG,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,+CAA+C,EAAE;IAChG,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,sCAAsC,EAAE;IACzF,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ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,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function rootHelpText(): string;
|
|
2
|
+
export declare function mcpHelpText(): string;
|
|
3
|
+
export declare function commandSuggestion(input: string | undefined): string;
|
|
4
|
+
export declare function mcpCommandSuggestion(input: string | undefined): string;
|
|
5
|
+
//# sourceMappingURL=help.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/app/help.ts"],"names":[],"mappings":"AAmCA,wBAAgB,YAAY,IAAI,MAAM,CA6CrC;AAED,wBAAgB,WAAW,IAAI,MAAM,CAuBpC;AA6CD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAQnE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAMtE"}
|
package/dist/app/help.js
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { COMMAND_REGISTRY, findCommandDefinition } from "./command-registry.js";
|
|
2
|
+
const COMMON_CONFUSIONS = new Map([
|
|
3
|
+
["check", "doctor"],
|
|
4
|
+
["diagnose", "doctor"],
|
|
5
|
+
["health", "doctor"],
|
|
6
|
+
["signin", "login"],
|
|
7
|
+
["sign-in", "login"],
|
|
8
|
+
["sign_in", "login"],
|
|
9
|
+
["signout", "logout"],
|
|
10
|
+
["sign-out", "logout"],
|
|
11
|
+
["sign_out", "logout"],
|
|
12
|
+
["profile", "whoami"],
|
|
13
|
+
["account", "whoami"],
|
|
14
|
+
["feedbacks", "feedback"],
|
|
15
|
+
["suggest", "feedback"],
|
|
16
|
+
["tool", "mcp tools"],
|
|
17
|
+
["mcp-tool", "mcp tools"],
|
|
18
|
+
["mcp-tools", "mcp tools"],
|
|
19
|
+
["invoke", "mcp call"],
|
|
20
|
+
["publish", "pulse-publish"],
|
|
21
|
+
["zip", "upload"],
|
|
22
|
+
["screenshot", "browser screenshot"],
|
|
23
|
+
["read", "browser read"]
|
|
24
|
+
]);
|
|
25
|
+
const MCP_CONFUSIONS = new Map([
|
|
26
|
+
["tool", "tools"],
|
|
27
|
+
["list", "tools"],
|
|
28
|
+
["describe", "tools"],
|
|
29
|
+
["schema", "tools"],
|
|
30
|
+
["invoke", "call"],
|
|
31
|
+
["run", "call"]
|
|
32
|
+
]);
|
|
33
|
+
export function rootHelpText() {
|
|
34
|
+
return [
|
|
35
|
+
"Vibecodr CLI",
|
|
36
|
+
"Usage: vibecodr <command> [options]",
|
|
37
|
+
"",
|
|
38
|
+
"Start here:",
|
|
39
|
+
" vibecodr status See what is already connected.",
|
|
40
|
+
" vibecodr doctor Check your local setup and get the next fix.",
|
|
41
|
+
" vibecodr login Sign in for publishing, uploads, Pulses, and MCP tools.",
|
|
42
|
+
" vibecodr start Sign in and verify the hosted Agent Computer.",
|
|
43
|
+
" vibecodr install codex Add Vibecodr to Codex. Also supports Cursor, Claude, VS Code, and Windsurf.",
|
|
44
|
+
"",
|
|
45
|
+
"Do useful things:",
|
|
46
|
+
" vibecodr browser read https://example.com",
|
|
47
|
+
" vibecodr browser screenshot https://example.com --out ./proof",
|
|
48
|
+
" vibecodr upload --zip ./project.zip",
|
|
49
|
+
" vibecodr pulse list",
|
|
50
|
+
" vibecodr feedback \"This part was confusing\"",
|
|
51
|
+
"",
|
|
52
|
+
"For scripts and advanced use:",
|
|
53
|
+
" vibecodr mcp tools List MCP Gateway tools.",
|
|
54
|
+
" vibecodr mcp call <tool> --input-json '{}'",
|
|
55
|
+
" vibecodr usage Show Agent Computer capacity.",
|
|
56
|
+
" vibecodr work list Show hosted work.",
|
|
57
|
+
" vibecodr proof list Show saved proof.",
|
|
58
|
+
"",
|
|
59
|
+
"Compatibility aliases:",
|
|
60
|
+
" vibecodr-mcp <command> Old MCP CLI name.",
|
|
61
|
+
" vc-tools <command> Old Agent Computer CLI name.",
|
|
62
|
+
" vibecodr tools Alias for vibecodr mcp tools.",
|
|
63
|
+
" vibecodr call Alias for vibecodr mcp call.",
|
|
64
|
+
"",
|
|
65
|
+
"Global flags:",
|
|
66
|
+
" --profile <name> Use a saved profile.",
|
|
67
|
+
" --json Stable machine-readable output.",
|
|
68
|
+
" --verbose Include extra diagnostic details.",
|
|
69
|
+
" --non-interactive Fail instead of prompting.",
|
|
70
|
+
"",
|
|
71
|
+
"More help:",
|
|
72
|
+
" vibecodr help <command>",
|
|
73
|
+
" vibecodr mcp --help",
|
|
74
|
+
" vibecodr browser --help",
|
|
75
|
+
"",
|
|
76
|
+
"If you are not sure what is broken, run: vibecodr doctor"
|
|
77
|
+
].join("\n");
|
|
78
|
+
}
|
|
79
|
+
export function mcpHelpText() {
|
|
80
|
+
return [
|
|
81
|
+
"Vibecodr MCP Gateway",
|
|
82
|
+
"",
|
|
83
|
+
"Use this when you want the tool catalog behind openai.vibecodr.space/mcp.",
|
|
84
|
+
"Most users should start with `vibecodr status`, `vibecodr login`, or `vibecodr install codex`.",
|
|
85
|
+
"",
|
|
86
|
+
"Common commands:",
|
|
87
|
+
" vibecodr mcp tools",
|
|
88
|
+
" List available MCP tools.",
|
|
89
|
+
" vibecodr mcp tools get_account_capabilities --schema",
|
|
90
|
+
" Describe one tool and its input shape.",
|
|
91
|
+
" vibecodr mcp call get_account_capabilities --input-json '{}'",
|
|
92
|
+
" Call one tool with structured input.",
|
|
93
|
+
"",
|
|
94
|
+
"Compatibility aliases:",
|
|
95
|
+
" vibecodr tools Equivalent to vibecodr mcp tools.",
|
|
96
|
+
" vibecodr call Equivalent to vibecodr mcp call.",
|
|
97
|
+
"",
|
|
98
|
+
"Power flags:",
|
|
99
|
+
" --json Keep output stable for scripts.",
|
|
100
|
+
" --non-interactive Never open login or prompt."
|
|
101
|
+
].join("\n");
|
|
102
|
+
}
|
|
103
|
+
function editDistance(a, b) {
|
|
104
|
+
if (a === b)
|
|
105
|
+
return 0;
|
|
106
|
+
if (a.length === 0)
|
|
107
|
+
return b.length;
|
|
108
|
+
if (b.length === 0)
|
|
109
|
+
return a.length;
|
|
110
|
+
const previous = Array.from({ length: b.length + 1 }, (_, index) => index);
|
|
111
|
+
const current = Array.from({ length: b.length + 1 }, () => 0);
|
|
112
|
+
for (let row = 1; row <= a.length; row += 1) {
|
|
113
|
+
current[0] = row;
|
|
114
|
+
for (let column = 1; column <= b.length; column += 1) {
|
|
115
|
+
const cost = a.charAt(row - 1) === b.charAt(column - 1) ? 0 : 1;
|
|
116
|
+
current[column] = Math.min((current[column - 1] ?? 0) + 1, (previous[column] ?? 0) + 1, (previous[column - 1] ?? 0) + cost);
|
|
117
|
+
}
|
|
118
|
+
previous.splice(0, previous.length, ...current);
|
|
119
|
+
}
|
|
120
|
+
return previous[b.length] ?? Number.MAX_SAFE_INTEGER;
|
|
121
|
+
}
|
|
122
|
+
function nearestRegisteredCommand(input) {
|
|
123
|
+
const normalized = input.toLowerCase();
|
|
124
|
+
let best;
|
|
125
|
+
for (const command of COMMAND_REGISTRY) {
|
|
126
|
+
const name = command.name.toLowerCase();
|
|
127
|
+
const distance = editDistance(normalized, name);
|
|
128
|
+
if (!best || distance < best.distance) {
|
|
129
|
+
best = { name: command.name, distance };
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (!best)
|
|
133
|
+
return undefined;
|
|
134
|
+
const maxDistance = normalized.length <= 4 ? 1 : 2;
|
|
135
|
+
return best.distance <= maxDistance ? best.name : undefined;
|
|
136
|
+
}
|
|
137
|
+
function preferredCommand(command) {
|
|
138
|
+
return findCommandDefinition(command)?.preferred ?? command;
|
|
139
|
+
}
|
|
140
|
+
export function commandSuggestion(input) {
|
|
141
|
+
const normalized = (input ?? "").toLowerCase();
|
|
142
|
+
const manual = COMMON_CONFUSIONS.get(normalized);
|
|
143
|
+
const suggestion = manual ?? nearestRegisteredCommand(normalized);
|
|
144
|
+
if (suggestion) {
|
|
145
|
+
return `Try \`vibecodr ${preferredCommand(suggestion)}\`. Run \`vibecodr --help\` for the common paths.`;
|
|
146
|
+
}
|
|
147
|
+
return "Run `vibecodr --help` for the common paths, or `vibecodr doctor` if setup is failing.";
|
|
148
|
+
}
|
|
149
|
+
export function mcpCommandSuggestion(input) {
|
|
150
|
+
const normalized = (input ?? "").toLowerCase();
|
|
151
|
+
const suggestion = MCP_CONFUSIONS.get(normalized) ?? (editDistance(normalized, "tools") <= 1 ? "tools" : undefined);
|
|
152
|
+
if (suggestion === "tools")
|
|
153
|
+
return "Try `vibecodr mcp tools`. Run `vibecodr mcp --help` for MCP Gateway examples.";
|
|
154
|
+
if (suggestion === "call")
|
|
155
|
+
return "Try `vibecodr mcp call <tool> --input-json '{}'`. Run `vibecodr mcp --help` for examples.";
|
|
156
|
+
return "Run `vibecodr mcp --help`, `vibecodr mcp tools`, or `vibecodr mcp call <tool> --input-json '{}'`.";
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/app/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,MAAM,iBAAiB,GAAgC,IAAI,GAAG,CAAC;IAC7D,CAAC,OAAO,EAAE,QAAQ,CAAC;IACnB,CAAC,UAAU,EAAE,QAAQ,CAAC;IACtB,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACpB,CAAC,QAAQ,EAAE,OAAO,CAAC;IACnB,CAAC,SAAS,EAAE,OAAO,CAAC;IACpB,CAAC,SAAS,EAAE,OAAO,CAAC;IACpB,CAAC,SAAS,EAAE,QAAQ,CAAC;IACrB,CAAC,UAAU,EAAE,QAAQ,CAAC;IACtB,CAAC,UAAU,EAAE,QAAQ,CAAC;IACtB,CAAC,SAAS,EAAE,QAAQ,CAAC;IACrB,CAAC,SAAS,EAAE,QAAQ,CAAC;IACrB,CAAC,WAAW,EAAE,UAAU,CAAC;IACzB,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HANGED
|
@@ -4,18 +4,23 @@ import { migrateLegacyDirsOnce } from "../storage/migrate.js";
|
|
|
4
4
|
import { ConfigStore } from "../storage/config-store.js";
|
|
5
5
|
import { SecretStore } from "../storage/secret-store.js";
|
|
6
6
|
import { TokenManager } from "../auth/token-manager.js";
|
|
7
|
+
import { DefaultCredentialBroker } from "../auth/credential-broker.js";
|
|
7
8
|
import { CLIENT_INFO, McpRuntimeClient } from "../core/mcp-client.js";
|
|
8
9
|
import { Output } from "../cli/output.js";
|
|
9
10
|
import { isHelpToken, isVersionToken, parseGlobalOptions } from "../cli/parse.js";
|
|
10
11
|
import { CliError, EXIT_CODES } from "../cli/errors.js";
|
|
12
|
+
import { AGENT_COMPUTER_COMMANDS } from "../app/command-registry.js";
|
|
13
|
+
import { commandSuggestion, rootHelpText } from "../app/help.js";
|
|
11
14
|
import { runLoginCommand } from "../commands/login.js";
|
|
12
15
|
import { runLogoutCommand } from "../commands/logout.js";
|
|
13
16
|
import { runStatusCommand } from "../commands/status.js";
|
|
14
17
|
import { runWhoamiCommand } from "../commands/whoami.js";
|
|
15
18
|
import { runToolsCommand } from "../commands/tools.js";
|
|
16
19
|
import { runCallCommand } from "../commands/call.js";
|
|
20
|
+
import { runMcpCommand } from "../commands/mcp.js";
|
|
17
21
|
import { runDoctorCommand } from "../commands/doctor.js";
|
|
18
22
|
import { runConfigCommand } from "../commands/config.js";
|
|
23
|
+
import { runFeedbackCommand } from "../commands/feedback.js";
|
|
19
24
|
import { runInstallCommand } from "../commands/install.js";
|
|
20
25
|
import { runUninstallCommand } from "../commands/uninstall.js";
|
|
21
26
|
import { runPulseSetupCommand } from "../commands/pulse-setup.js";
|
|
@@ -23,74 +28,49 @@ import { runPulsePublishCommand } from "../commands/pulse-publish.js";
|
|
|
23
28
|
import { runPulseCommand } from "../commands/pulse.js";
|
|
24
29
|
import { runUploadCommand } from "../commands/upload.js";
|
|
25
30
|
import { runUpdateCommand } from "../commands/update.js";
|
|
31
|
+
import { ConfigStore as VcToolsConfigStore } from "../legacy/config/store.js";
|
|
26
32
|
reconcileEnv();
|
|
27
33
|
await migrateLegacyDirsOnce();
|
|
28
|
-
function helpText() {
|
|
29
|
-
return [
|
|
30
|
-
"vibecodr <command> [options]",
|
|
31
|
-
"Compatibility alias: vibecodr-mcp <command> [options]",
|
|
32
|
-
"",
|
|
33
|
-
"Hosted Agent Computer:",
|
|
34
|
-
" start Connect and verify the Agent Computer; return agent connection details.",
|
|
35
|
-
" try Run a small browser, computer, proof, and usage check.",
|
|
36
|
-
" agent <connect|instructions|status> Connect an agent to the hosted computer or check readiness.",
|
|
37
|
-
" computer <start|status|run|test> Start, check status, or run commands on the hosted Agent Computer.",
|
|
38
|
-
" browser <render|screenshot|read|markdown|pdf|crawl|snapshot|ask>",
|
|
39
|
-
" Render, read, screenshot, crawl, or inspect public HTTPS pages.",
|
|
40
|
-
" work <list|show|status|follow|cancel> List, follow, show, or cancel hosted work.",
|
|
41
|
-
" proof <list|show|save|delete> List, show, save, or delete saved outputs and artifacts.",
|
|
42
|
-
" usage Show account-scoped Agent Computer capacity and quota progress.",
|
|
43
|
-
" plans Show plan and entitlement details for the connected account.",
|
|
44
|
-
" dashboard Print the hosted supervision dashboard URL.",
|
|
45
|
-
"",
|
|
46
|
-
"Account & install:",
|
|
47
|
-
" login Authorize this CLI against the Vibecodr MCP gateway.",
|
|
48
|
-
" logout Revoke the stored refresh token and clear the local session.",
|
|
49
|
-
" status Show connection, config, and session status.",
|
|
50
|
-
" whoami Show the connected account profile.",
|
|
51
|
-
" doctor Diagnose connection, auth, and runtime readiness.",
|
|
52
|
-
" install <client> Install the Vibecodr MCP server into a host (codex, cursor, vscode, windsurf, claude-desktop, claude-code).",
|
|
53
|
-
" uninstall <client> Remove a previously-installed MCP host entry.",
|
|
54
|
-
" config Manage profiles and stored configuration.",
|
|
55
|
-
" tools [tool] List or describe MCP tools exposed by the gateway.",
|
|
56
|
-
" call <tool> Invoke a tool by name with structured input.",
|
|
57
|
-
" upload --zip <path> | --image <path> [--kind cover_image|avatar_image]",
|
|
58
|
-
"",
|
|
59
|
-
"Pulses:",
|
|
60
|
-
" pulse-setup [--descriptor-setup-json <json> | --descriptor-setup-file <path>]",
|
|
61
|
-
" pulse-publish --name <name> (--code <source> | --code-file <path>) --confirm",
|
|
62
|
-
" pulse <list|get|status|run|archive|restore|create|deploy>",
|
|
63
|
-
" Publishes a standalone Pulse with private source/metadata visibility by default.",
|
|
64
|
-
" The runtime URL is still public HTTP unless the Pulse code rejects callers.",
|
|
65
|
-
"",
|
|
66
|
-
"Account policy & monitoring:",
|
|
67
|
-
" grants Show effective tool grants for your account, project, or user.",
|
|
68
|
-
" retention <show|set> Show or update the retention policy for logs, artifacts, and recordings.",
|
|
69
|
-
" scheduled-qa <list|create|pause|resume|delete>",
|
|
70
|
-
" Manage plan-capped scheduled browser checks (uptime-style monitoring).",
|
|
71
|
-
"",
|
|
72
|
-
"Automation handoff:",
|
|
73
|
-
" auth <diagnose|status|export-agent-env>",
|
|
74
|
-
" Diagnose the local credential or export it to a file for CI/automation.",
|
|
75
|
-
" Secret values are never printed; export returns the matching env var name.",
|
|
76
|
-
"",
|
|
77
|
-
"CLI maintenance:",
|
|
78
|
-
" update [--check] [--yes] [--via <npm|pnpm|yarn|bun>]",
|
|
79
|
-
"",
|
|
80
|
-
"Global flags:",
|
|
81
|
-
" --profile <name>",
|
|
82
|
-
" --json",
|
|
83
|
-
" --verbose",
|
|
84
|
-
" --non-interactive"
|
|
85
|
-
].join("\n");
|
|
86
|
-
}
|
|
87
34
|
function versionText() {
|
|
88
35
|
return String(CLIENT_INFO.version);
|
|
89
36
|
}
|
|
37
|
+
const AGENT_COMPUTER_AUTH_SCOPES = new Set(["agent", "agent-computer", "computer"]);
|
|
38
|
+
const MCP_GATEWAY_AUTH_SCOPES = new Set(["mcp", "mcp-gateway", "gateway"]);
|
|
39
|
+
function legacyArgsWithSharedFlags(command, commandArgs, globalOptions) {
|
|
40
|
+
const args = [command, ...commandArgs];
|
|
41
|
+
if (globalOptions.json && !args.includes("--json"))
|
|
42
|
+
args.push("--json");
|
|
43
|
+
if (globalOptions.nonInteractive && !args.includes("--no-input"))
|
|
44
|
+
args.push("--no-input");
|
|
45
|
+
return args;
|
|
46
|
+
}
|
|
47
|
+
function originalLegacyArgs(rawArgv, globalOptions) {
|
|
48
|
+
const args = rawArgv.filter((arg) => arg !== "--non-interactive");
|
|
49
|
+
if (!globalOptions.nonInteractive || args.includes("--no-input"))
|
|
50
|
+
return args;
|
|
51
|
+
return [...args, "--no-input"];
|
|
52
|
+
}
|
|
53
|
+
async function runLegacyAgentComputer(args) {
|
|
54
|
+
const { runCli } = await import("../legacy/cli/run.js");
|
|
55
|
+
const code = await runCli(args);
|
|
56
|
+
process.exitCode = code;
|
|
57
|
+
}
|
|
90
58
|
async function main() {
|
|
91
|
-
const
|
|
59
|
+
const rawArgv = process.argv.slice(2);
|
|
60
|
+
let { command, commandArgs, globalOptions } = parseGlobalOptions(rawArgv);
|
|
61
|
+
let helpRerouted = false;
|
|
62
|
+
if (command === "help") {
|
|
63
|
+
if (commandArgs.length === 0) {
|
|
64
|
+
process.stdout.write(rootHelpText() + "\n");
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const [helpTarget, ...helpRest] = commandArgs;
|
|
68
|
+
command = helpTarget;
|
|
69
|
+
commandArgs = [...helpRest, "--help"];
|
|
70
|
+
helpRerouted = true;
|
|
71
|
+
}
|
|
92
72
|
if (!command || isHelpToken(command)) {
|
|
93
|
-
process.stdout.write(
|
|
73
|
+
process.stdout.write(rootHelpText() + "\n");
|
|
94
74
|
return;
|
|
95
75
|
}
|
|
96
76
|
if (isVersionToken(command)) {
|
|
@@ -102,19 +82,42 @@ async function main() {
|
|
|
102
82
|
const tokenManager = new TokenManager(configStore, secretStore);
|
|
103
83
|
const runtimeClient = new McpRuntimeClient();
|
|
104
84
|
const output = new Output(globalOptions);
|
|
85
|
+
const vcToolsStore = VcToolsConfigStore.resolve(process.env);
|
|
86
|
+
const credentialBroker = new DefaultCredentialBroker({
|
|
87
|
+
vcToolsStore,
|
|
88
|
+
mcpSecretStore: secretStore,
|
|
89
|
+
mcpConfigStore: configStore
|
|
90
|
+
});
|
|
105
91
|
const context = {
|
|
106
92
|
globalOptions,
|
|
107
93
|
output,
|
|
108
94
|
configStore,
|
|
109
95
|
secretStore,
|
|
110
96
|
tokenManager,
|
|
111
|
-
runtimeClient
|
|
97
|
+
runtimeClient,
|
|
98
|
+
credentialBroker
|
|
112
99
|
};
|
|
113
100
|
switch (command) {
|
|
114
101
|
case "login":
|
|
102
|
+
if (AGENT_COMPUTER_AUTH_SCOPES.has(commandArgs[0] ?? "")) {
|
|
103
|
+
await runLegacyAgentComputer(legacyArgsWithSharedFlags(command, commandArgs.slice(1), globalOptions));
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (MCP_GATEWAY_AUTH_SCOPES.has(commandArgs[0] ?? "")) {
|
|
107
|
+
await runLoginCommand(commandArgs.slice(1), context);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
115
110
|
await runLoginCommand(commandArgs, context);
|
|
116
111
|
return;
|
|
117
112
|
case "logout":
|
|
113
|
+
if (AGENT_COMPUTER_AUTH_SCOPES.has(commandArgs[0] ?? "")) {
|
|
114
|
+
await runLegacyAgentComputer(legacyArgsWithSharedFlags(command, commandArgs.slice(1), globalOptions));
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (MCP_GATEWAY_AUTH_SCOPES.has(commandArgs[0] ?? "")) {
|
|
118
|
+
await runLogoutCommand(commandArgs.slice(1), context);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
118
121
|
await runLogoutCommand(commandArgs, context);
|
|
119
122
|
return;
|
|
120
123
|
case "status":
|
|
@@ -124,11 +127,20 @@ async function main() {
|
|
|
124
127
|
await runWhoamiCommand(commandArgs, context);
|
|
125
128
|
return;
|
|
126
129
|
case "tools":
|
|
130
|
+
if (commandArgs[0] === "test") {
|
|
131
|
+
await runLegacyAgentComputer(helpRerouted
|
|
132
|
+
? legacyArgsWithSharedFlags(command, commandArgs, globalOptions)
|
|
133
|
+
: originalLegacyArgs(rawArgv, globalOptions));
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
127
136
|
await runToolsCommand(commandArgs, context);
|
|
128
137
|
return;
|
|
129
138
|
case "call":
|
|
130
139
|
await runCallCommand(commandArgs, context);
|
|
131
140
|
return;
|
|
141
|
+
case "mcp":
|
|
142
|
+
await runMcpCommand(commandArgs, context);
|
|
143
|
+
return;
|
|
132
144
|
case "upload":
|
|
133
145
|
await runUploadCommand(commandArgs, context);
|
|
134
146
|
return;
|
|
@@ -144,6 +156,9 @@ async function main() {
|
|
|
144
156
|
case "config":
|
|
145
157
|
await runConfigCommand(commandArgs, context);
|
|
146
158
|
return;
|
|
159
|
+
case "feedback":
|
|
160
|
+
await runFeedbackCommand(commandArgs, context);
|
|
161
|
+
return;
|
|
147
162
|
case "pulse-setup":
|
|
148
163
|
await runPulseSetupCommand(commandArgs, context);
|
|
149
164
|
return;
|
|
@@ -157,40 +172,18 @@ async function main() {
|
|
|
157
172
|
await runUpdateCommand(commandArgs, context);
|
|
158
173
|
return;
|
|
159
174
|
default:
|
|
160
|
-
if (
|
|
175
|
+
if (AGENT_COMPUTER_COMMANDS.has(command)) {
|
|
161
176
|
// Vibecodr v1 surfaces the hosted Agent Computer commands (browser, computer,
|
|
162
177
|
// work, etc.) through both the vibecodr and vc-tools bin names. The legacy
|
|
163
178
|
// vc-tools dispatcher owns the byte-equivalent output, so delegate to it.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
179
|
+
await runLegacyAgentComputer(helpRerouted
|
|
180
|
+
? legacyArgsWithSharedFlags(command, commandArgs, globalOptions)
|
|
181
|
+
: originalLegacyArgs(rawArgv, globalOptions));
|
|
167
182
|
return;
|
|
168
183
|
}
|
|
169
|
-
throw new CliError("usage.command", `Unknown command: ${command}`, EXIT_CODES.usage);
|
|
184
|
+
throw new CliError("usage.command", `Unknown command: ${command}`, EXIT_CODES.usage, { nextStep: commandSuggestion(command) });
|
|
170
185
|
}
|
|
171
186
|
}
|
|
172
|
-
const VC_TOOLS_ONLY_COMMANDS = new Set([
|
|
173
|
-
"start",
|
|
174
|
-
"setup",
|
|
175
|
-
"try",
|
|
176
|
-
"agent",
|
|
177
|
-
"auth",
|
|
178
|
-
"connect",
|
|
179
|
-
"computer",
|
|
180
|
-
"browser",
|
|
181
|
-
"work",
|
|
182
|
-
"proof",
|
|
183
|
-
"usage",
|
|
184
|
-
"limits",
|
|
185
|
-
"dashboard",
|
|
186
|
-
"jobs",
|
|
187
|
-
"artifacts",
|
|
188
|
-
"grants",
|
|
189
|
-
"retention",
|
|
190
|
-
"scheduled-qa",
|
|
191
|
-
"plans",
|
|
192
|
-
"inspect"
|
|
193
|
-
]);
|
|
194
187
|
main().catch((error) => {
|
|
195
188
|
const { globalOptions } = parseGlobalOptions(process.argv.slice(2));
|
|
196
189
|
new Output(globalOptions).failure(error);
|