@vibeprospecting/vpai 0.1.3 → 0.1.5

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 CHANGED
@@ -35,29 +35,28 @@ npm install -g @vibeprospecting/vpai
35
35
 
36
36
  ```bash
37
37
  git clone <repo>
38
- cd mcp-cli
38
+ cd vpai-cli
39
39
  npm install
40
40
  npm run build
41
41
  ```
42
42
 
43
43
  Produces:
44
44
 
45
- - `dist/vpai.js` – Bun bundle (requires Bun runtime)
46
- - `dist/vpai` – Standalone executable (no runtime; Linux/macOS)
45
+ - `dist/vpai.js` – Node-compatible bundle (runs with Node.js)
47
46
 
48
47
  ### Run without installing
49
48
 
50
49
  ```bash
51
50
  npm run call -- <command> [options]
52
51
  # or
53
- bun dist/vpai.js <command> [options]
52
+ node dist/vpai.js <command> [options]
54
53
  ```
55
54
 
56
55
  ---
57
56
 
58
57
  ## Prerequisites
59
58
 
60
- - [Bun](https://bun.sh) (for build) or Node.js
59
+ - [Node.js](https://nodejs.org) (required for running and building)
61
60
  - OAuth access to Explorium MCP
62
61
 
63
62
  ---
@@ -117,15 +116,13 @@ vpai autocomplete --args '{"field":"linkedin_category","query":"software"}'
117
116
 
118
117
  ## Production
119
118
 
120
- ### Standalone binary
119
+ ### Deployment
121
120
 
122
- The compiled `dist/vpai` binary is self-contained. Deploy by copying it to the target system; no Node/Bun or config files required.
121
+ Install via npm for production use. Node.js is required on the target system.
123
122
 
124
123
  ```bash
125
- # Copy to PATH
126
- cp dist/vpai /usr/local/bin/vpai
127
- # or
128
- cp dist/vpai ~/bin/vpai
124
+ npm install -g @vibeprospecting/vpai
125
+ # or copy dist/vpai.js and add to PATH (Node.js required)
129
126
  ```
130
127
 
131
128
  ### Auth
@@ -136,12 +133,27 @@ OAuth runs automatically on first use (browser opens). Tokens are cached by mcpo
136
133
 
137
134
  MCP server URL, OAuth settings, and timeout are embedded in the build (`src/embedded-config.ts`). No external config files.
138
135
 
136
+ ### Error handling
137
+
138
+ All failure paths set `process.exitCode = 1` or call `process.exit(1)` so the process exits with a non-zero code:
139
+
140
+ | Failure | Behavior |
141
+ |---------|----------|
142
+ | Runtime init (`ensureRuntime`) | Logs "Failed to initialize MCP runtime", rethrows, CLI catches and exits 1 |
143
+ | List tools (`listTools`) | Logs "Failed to list tools from MCP server", rethrows, CLI catches and exits 1 |
144
+ | Schema resolution (`resolveToolSchema`) | Logs "Schema resolution failed", sets exitCode 1 |
145
+ | Tool execution (timeout, API error) | Logs "Tool execution timed out" or "Tool execution failed", sets exitCode 1 |
146
+ | Invalid `--args` JSON | Logs "Invalid JSON in --args", sets exitCode 1 |
147
+ | Non-object `--args` | Logs "--args must be a JSON object", sets exitCode 1 |
148
+
149
+ Errors are logged as JSON to stderr. No unhandled promise rejections or silent failures.
150
+
139
151
  ---
140
152
 
141
153
  ## Project Structure
142
154
 
143
155
  ```
144
- mcp-cli/
156
+ vpai-cli/
145
157
  ├── src/
146
158
  │ ├── cli.ts # Entry point
147
159
  │ ├── proxy.ts # Tool registration