@vibecodr/cli 1.0.6 → 1.0.8
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 +33 -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 -80
- 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/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.d.ts.map +1 -1
- package/dist/commands/tools.js +45 -1
- package/dist/commands/tools.js.map +1 -1
- package/dist/legacy/cli/install.js +4 -4
- package/dist/legacy/cli/run.js +353 -353
- package/dist/legacy/cli/run.js.map +1 -1
- package/dist/legacy/config/store.js +7 -7
- package/dist/legacy/core/api-client.js +3 -3
- package/dist/legacy/core/api-client.js.map +1 -1
- package/dist/legacy/core/validators.js +4 -4
- package/dist/legacy/core/version.d.ts +2 -2
- package/dist/legacy/core/version.js +1 -1
- package/docs/API-CONTRACT.md +605 -606
- package/docs/RELEASE-CHECKLIST.md +264 -260
- package/docs/SECURITY.md +166 -162
- package/docs/VALIDATION-MATRIX.md +45 -45
- package/docs/architecture.md +9 -6
- package/docs/auth.md +15 -7
- package/docs/commands.md +280 -256
- package/docs/install.md +5 -5
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
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.7
|
|
6
|
+
|
|
7
|
+
Verbiage and discoverability cleanup driven by user reports on 1.0.6.
|
|
8
|
+
|
|
9
|
+
**1. Every user-facing string now teaches `vibecodr`, not `vc-tools`.** Through 1.0.6, the dispatcher correctly cross-routed commands like `agent`, `browser`, `retention` from the canonical `vibecodr` / `vibecodr-mcp` bins, but the legacy dispatcher's help text, Usage lines, error nextStep hints, version banner, and Examples block still printed `vc-tools <command>` everywhere. Running `vibecodr agent -h` would show `Usage: vc-tools agent connect`. Running `vibecodr retention` (no subcommand) would error with `Use vc-tools retention show`. ~176 hits in `src/legacy/cli/run.ts` plus 5 docs files, 4 output-baseline fixtures, and assorted test assertions are now aligned. The compatibility-only `vc-tools` bin still ships, but it now teaches `vibecodr <command>` in its own help to nudge users toward the canonical name.
|
|
10
|
+
|
|
11
|
+
The package name (`@vibecodr/cli`), the `vc-tools` bin entry, the OS keyring service IDs, the legacy `VC_TOOLS_*` env var aliases, the legacy config dir migration paths, the `serverName: "vc-tools"` default for MCP client install entries, and the `.vc-tools.bak` backup-file suffix on legacy MCP upgrades all kept their existing names — those are real identifiers that would break orphan stored credentials / installed agent clients / migration on rename.
|
|
12
|
+
|
|
13
|
+
- `src/legacy/cli/run.ts`: dispatcher-side user-facing strings flipped from `vc-tools` to `vibecodr`.
|
|
14
|
+
- `src/legacy/cli/install.ts`, `src/legacy/config/store.ts`, `src/legacy/core/api-client.ts`, `src/legacy/core/validators.ts`: error messages and prose aligned.
|
|
15
|
+
- `docs/{commands,API-CONTRACT,RELEASE-CHECKLIST,SECURITY,VALIDATION-MATRIX}.md`: command examples flipped to `vibecodr`.
|
|
16
|
+
- `test/legacy/cli.behavior.test.ts`, `test/cli-dispatch.test.ts`: assertions flipped to the new verbiage.
|
|
17
|
+
- `test/fixtures/output-baseline/vc-tools-{doctor,plans,start,status}.json`: fixture contents updated (filenames stay opaque keys).
|
|
18
|
+
- Default `vibecodr try` output dir flipped from `vc-tools-proof/` to `vibecodr-proof/`.
|
|
19
|
+
|
|
20
|
+
**2. `vibecodr --help` reorganized.** Through 1.0.6 the help text had a flat `Advanced / diagnostic:` line listing `auth, setup, connect, inspect, jobs, artifacts, grants, retention, scheduled-qa, limits` — most of which are either redundant aliases (`setup`=`start`, `limits`=`usage`, `jobs`=`work`, `artifacts`=`proof`, `connect`=`agent connect`) or genuinely useful product features the user didn't realize were available. The help now:
|
|
21
|
+
- **Hides the redundant aliases and the dev-only `inspect` command** from `--help`. The routing stays — existing scripts that learned `vc-tools jobs list` still work — they're just no longer advertised in the canonical bin's help.
|
|
22
|
+
- **Promotes the real product features into their own `Account policy & monitoring:` section** with inline subcommand hints: `grants`, `retention <show|set>`, `scheduled-qa <list|create|pause|resume|delete>`. These hit real authenticated endpoints (`GET /grants`, `GET /retention`, the `*/scheduled-qa` family) and were buried.
|
|
23
|
+
- **Surfaces `auth` in a dedicated `Automation handoff:` section** with the `<diagnose|status|export-agent-env>` subcommand hint, framed as the CI/automation credential workflow it actually is (rather than as "diagnostic" alongside random aliases).
|
|
24
|
+
- **Adds inline subcommand syntax** to the Hosted Agent Computer section (e.g., `agent <connect|instructions|status>`, `computer <start|status|run|test>`, `browser <render|screenshot|read|markdown|pdf|crawl|snapshot|ask>`, `work <list|show|...>`, `proof <list|show|save|delete>`) so `vibecodr retention` no longer feels like it stranded the user when it asks for a subcommand.
|
|
25
|
+
|
|
26
|
+
- `src/bin/vibecodr-mcp.ts`: `helpText()` restructured into Hosted Agent Computer / Account & install / Pulses / Account policy & monitoring / Automation handoff / CLI maintenance / Global flags.
|
|
27
|
+
|
|
28
|
+
**3. `vibecodr tools` output is now scannable.** The MCP gateway returns long-paragraph descriptions for each tool — they're written for AI agents that read the description to decide which tool to call, so they're verbose by design. Through 1.0.6 the CLI dumped them one-tool-per-line as `name: full_paragraph`, which produced a wall of wrapped text. The default human path now:
|
|
29
|
+
- Shows only the **first sentence** of each description, truncated to fit terminal width with `…`.
|
|
30
|
+
- **Column-aligns** tool names against descriptions for scanning.
|
|
31
|
+
- **Groups** tools visually by name prefix (so `get_*` / `list_*` / `publish_*` cluster together).
|
|
32
|
+
- Adds a **header** with tool count and gateway URL, and a **footer** pointing to `vibecodr tools <tool-name>` for the full description, `--search <query>` for filtering, and `--json` for machine-readable output.
|
|
33
|
+
|
|
34
|
+
The `--json` envelope is byte-identical to 1.0.6 (the existing `test/output-baseline-mcp.test.ts` fixture still passes unchanged); only the human-readable lines changed.
|
|
35
|
+
|
|
36
|
+
- `src/commands/tools.ts`: `renderToolsList()` helper + first-sentence summarizer + prefix-grouping.
|
|
37
|
+
|
|
5
38
|
## 1.0.6
|
|
6
39
|
|
|
7
40
|
Hardens `vibecodr update` against three issues reported on Windows after the 1.0.4/1.0.5 releases.
|
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,EAAE,OAAO,EAAE,8CAA8C,EAAE;IAC9F,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,mCAAmC,EAAE;IACnF,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAA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AAE,OAAO,EAAE,6BAA6B,EAAE;IACzF,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,oCAAoC,EAAE;CACzF,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAC5C,gBAAgB,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,KAAK,gBAAgB,IAAI,OAAO,CAAC,OAAO,KAAK,eAAe,CAAC;KAC9G,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,GAAG,CACzC,gBAAgB,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,KAAK,aAAa,CAAC;KACpE,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAClC,CAAC;AAEF,MAAM,UAAU,qBAAqB,CAAC,IAAwB;IAC5D,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAAuB;IAC5D,OAAO,gBAAgB;SACpB,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC;SAChD,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,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,CAAC,SAAS,EAAE,UAAU,CAAC;IACvB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,UAAU,EAAE,WAAW,CAAC;IACzB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,QAAQ,EAAE,UAAU,CAAC;IACtB,CAAC,SAAS,E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CAAC,CAAC,CAAC,SAAS,CAAC;AAC9D,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAe;IACvC,OAAO,qBAAqB,CAAC,OAAO,CAAC,EAAE,SAAS,IAAI,OAAO,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAyB;IACzD,MAAM,UAAU,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/C,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,MAAM,IAAI,wBAAwB,CAAC,UAAU,CAAC,CAAC;IAClE,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,kBAAkB,gBAAgB,CAAC,UAAU,CAAC,mDAAmD,CAAC;IAC3G,CAAC;IACD,OAAO,uFAAuF,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAyB;IAC5D,MAAM,UAAU,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/C,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACpH,IAAI,UAAU,KAAK,OAAO;QAAE,OAAO,+EAA+E,CAAC;IACnH,IAAI,UAAU,KAAK,MAAM;QAAE,OAAO,2FAA2F,CAAC;IAC9H,OAAO,mGAAmG,CAAC;AAC7G,CAAC"}
|
package/dist/bin/vibecodr-mcp.js
CHANGED
|
@@ -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,65 +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 an agent to the hosted computer or check readiness.",
|
|
37
|
-
" computer Start, check status, or run commands on the hosted Agent Computer.",
|
|
38
|
-
" browser Render, read, screenshot, crawl, or inspect public HTTPS pages.",
|
|
39
|
-
" work List, follow, show, or cancel hosted work.",
|
|
40
|
-
" proof List, show, save, or delete saved outputs and artifacts.",
|
|
41
|
-
" usage Show account-scoped Agent Computer capacity and quota progress.",
|
|
42
|
-
" plans Show plan and entitlement details for the connected account.",
|
|
43
|
-
" dashboard Print the hosted supervision dashboard URL.",
|
|
44
|
-
"",
|
|
45
|
-
"Account & install:",
|
|
46
|
-
" login Authorize this CLI against the Vibecodr MCP gateway.",
|
|
47
|
-
" logout Revoke the stored refresh token and clear the local session.",
|
|
48
|
-
" status Show connection, config, and session status.",
|
|
49
|
-
" whoami Show the connected account profile.",
|
|
50
|
-
" doctor Diagnose connection, auth, and runtime readiness.",
|
|
51
|
-
" install <client> Install Vibecodr MCP into a host (codex, cursor, vscode, windsurf, claude-desktop, claude-code).",
|
|
52
|
-
" uninstall <client> Remove a previously-installed MCP host entry.",
|
|
53
|
-
" config Manage profiles and stored configuration.",
|
|
54
|
-
" tools [tool] List or describe MCP tools exposed by the gateway.",
|
|
55
|
-
" call <tool> Invoke a tool by name with structured input.",
|
|
56
|
-
" upload --zip <path> | --image <path> [--kind cover_image|avatar_image]",
|
|
57
|
-
"",
|
|
58
|
-
"Pulses:",
|
|
59
|
-
" pulse-setup [--descriptor-setup-json <json> | --descriptor-setup-file <path>]",
|
|
60
|
-
" pulse-publish --name <name> (--code <source> | --code-file <path>) --confirm",
|
|
61
|
-
" pulse <list|get|status|run|archive|restore|create|deploy>",
|
|
62
|
-
" Publishes a standalone Pulse with private source/metadata visibility by default.",
|
|
63
|
-
" The runtime URL is still public HTTP unless the Pulse code rejects callers.",
|
|
64
|
-
"",
|
|
65
|
-
"CLI maintenance:",
|
|
66
|
-
" update [--check] [--yes] [--via <npm|pnpm|yarn|bun>]",
|
|
67
|
-
"",
|
|
68
|
-
"Advanced / diagnostic:",
|
|
69
|
-
" auth, setup, connect, inspect, jobs, artifacts, grants, retention, scheduled-qa, limits",
|
|
70
|
-
"",
|
|
71
|
-
"Global flags:",
|
|
72
|
-
" --profile <name>",
|
|
73
|
-
" --json",
|
|
74
|
-
" --verbose",
|
|
75
|
-
" --non-interactive"
|
|
76
|
-
].join("\n");
|
|
77
|
-
}
|
|
78
34
|
function versionText() {
|
|
79
35
|
return String(CLIENT_INFO.version);
|
|
80
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
|
+
}
|
|
81
58
|
async function main() {
|
|
82
|
-
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
|
+
}
|
|
83
72
|
if (!command || isHelpToken(command)) {
|
|
84
|
-
process.stdout.write(
|
|
73
|
+
process.stdout.write(rootHelpText() + "\n");
|
|
85
74
|
return;
|
|
86
75
|
}
|
|
87
76
|
if (isVersionToken(command)) {
|
|
@@ -93,19 +82,42 @@ async function main() {
|
|
|
93
82
|
const tokenManager = new TokenManager(configStore, secretStore);
|
|
94
83
|
const runtimeClient = new McpRuntimeClient();
|
|
95
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
|
+
});
|
|
96
91
|
const context = {
|
|
97
92
|
globalOptions,
|
|
98
93
|
output,
|
|
99
94
|
configStore,
|
|
100
95
|
secretStore,
|
|
101
96
|
tokenManager,
|
|
102
|
-
runtimeClient
|
|
97
|
+
runtimeClient,
|
|
98
|
+
credentialBroker
|
|
103
99
|
};
|
|
104
100
|
switch (command) {
|
|
105
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
|
+
}
|
|
106
110
|
await runLoginCommand(commandArgs, context);
|
|
107
111
|
return;
|
|
108
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
|
+
}
|
|
109
121
|
await runLogoutCommand(commandArgs, context);
|
|
110
122
|
return;
|
|
111
123
|
case "status":
|
|
@@ -115,11 +127,20 @@ async function main() {
|
|
|
115
127
|
await runWhoamiCommand(commandArgs, context);
|
|
116
128
|
return;
|
|
117
129
|
case "tools":
|
|
130
|
+
if (commandArgs[0] === "test") {
|
|
131
|
+
await runLegacyAgentComputer(helpRerouted
|
|
132
|
+
? legacyArgsWithSharedFlags(command, commandArgs, globalOptions)
|
|
133
|
+
: originalLegacyArgs(rawArgv, globalOptions));
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
118
136
|
await runToolsCommand(commandArgs, context);
|
|
119
137
|
return;
|
|
120
138
|
case "call":
|
|
121
139
|
await runCallCommand(commandArgs, context);
|
|
122
140
|
return;
|
|
141
|
+
case "mcp":
|
|
142
|
+
await runMcpCommand(commandArgs, context);
|
|
143
|
+
return;
|
|
123
144
|
case "upload":
|
|
124
145
|
await runUploadCommand(commandArgs, context);
|
|
125
146
|
return;
|
|
@@ -135,6 +156,9 @@ async function main() {
|
|
|
135
156
|
case "config":
|
|
136
157
|
await runConfigCommand(commandArgs, context);
|
|
137
158
|
return;
|
|
159
|
+
case "feedback":
|
|
160
|
+
await runFeedbackCommand(commandArgs, context);
|
|
161
|
+
return;
|
|
138
162
|
case "pulse-setup":
|
|
139
163
|
await runPulseSetupCommand(commandArgs, context);
|
|
140
164
|
return;
|
|
@@ -148,40 +172,18 @@ async function main() {
|
|
|
148
172
|
await runUpdateCommand(commandArgs, context);
|
|
149
173
|
return;
|
|
150
174
|
default:
|
|
151
|
-
if (
|
|
175
|
+
if (AGENT_COMPUTER_COMMANDS.has(command)) {
|
|
152
176
|
// Vibecodr v1 surfaces the hosted Agent Computer commands (browser, computer,
|
|
153
177
|
// work, etc.) through both the vibecodr and vc-tools bin names. The legacy
|
|
154
178
|
// vc-tools dispatcher owns the byte-equivalent output, so delegate to it.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
179
|
+
await runLegacyAgentComputer(helpRerouted
|
|
180
|
+
? legacyArgsWithSharedFlags(command, commandArgs, globalOptions)
|
|
181
|
+
: originalLegacyArgs(rawArgv, globalOptions));
|
|
158
182
|
return;
|
|
159
183
|
}
|
|
160
|
-
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) });
|
|
161
185
|
}
|
|
162
186
|
}
|
|
163
|
-
const VC_TOOLS_ONLY_COMMANDS = new Set([
|
|
164
|
-
"start",
|
|
165
|
-
"setup",
|
|
166
|
-
"try",
|
|
167
|
-
"agent",
|
|
168
|
-
"auth",
|
|
169
|
-
"connect",
|
|
170
|
-
"computer",
|
|
171
|
-
"browser",
|
|
172
|
-
"work",
|
|
173
|
-
"proof",
|
|
174
|
-
"usage",
|
|
175
|
-
"limits",
|
|
176
|
-
"dashboard",
|
|
177
|
-
"jobs",
|
|
178
|
-
"artifacts",
|
|
179
|
-
"grants",
|
|
180
|
-
"retention",
|
|
181
|
-
"scheduled-qa",
|
|
182
|
-
"plans",
|
|
183
|
-
"inspect"
|
|
184
|
-
]);
|
|
185
187
|
main().catch((error) => {
|
|
186
188
|
const { globalOptions } = parseGlobalOptions(process.argv.slice(2));
|
|
187
189
|
new Output(globalOptions).failure(error);
|