vibium 0.1.4 → 0.1.6

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.
Files changed (3) hide show
  1. package/bin/cli.js +43 -0
  2. package/package.json +14 -8
  3. package/bin.js +0 -24
package/bin/cli.js ADDED
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ // Find clicker binary from platform package and run it.
3
+ // Default: `vibium` → `clicker mcp` (MCP server mode)
4
+ // Known subcommands pass through directly.
5
+
6
+ const { execFileSync } = require('child_process');
7
+ const path = require('path');
8
+ const os = require('os');
9
+
10
+ // Subcommands that the binary handles directly
11
+ const KNOWN_SUBCOMMANDS = new Set([
12
+ 'mcp', 'navigate', 'click', 'type', 'find', 'find-all', 'screenshot',
13
+ 'text', 'html', 'url', 'title', 'eval', 'hover', 'scroll', 'select',
14
+ 'keys', 'wait', 'tabs', 'tab-new', 'tab-switch', 'tab-close', 'quit',
15
+ 'install', 'serve', 'version', 'paths', 'daemon', 'add-skill',
16
+ 'launch-test', 'ws-test', 'bidi-test', 'check-actionable',
17
+ 'help', 'completion',
18
+ ]);
19
+
20
+ function getClickerPath() {
21
+ const platform = os.platform();
22
+ const arch = os.arch() === 'x64' ? 'x64' : 'arm64';
23
+ const packageName = `@vibium/${platform}-${arch}`;
24
+ const binaryName = platform === 'win32' ? 'clicker.exe' : 'clicker';
25
+
26
+ try {
27
+ const packagePath = require.resolve(`${packageName}/package.json`);
28
+ return path.join(path.dirname(packagePath), 'bin', binaryName);
29
+ } catch {
30
+ console.error(`Could not find clicker binary for ${platform}-${arch}`);
31
+ process.exit(1);
32
+ }
33
+ }
34
+
35
+ const clickerPath = getClickerPath();
36
+ const userArgs = process.argv.slice(2);
37
+
38
+ // If no args or first arg is not a known subcommand, default to 'mcp'
39
+ const args = (userArgs.length === 0 || !KNOWN_SUBCOMMANDS.has(userArgs[0]))
40
+ ? ['mcp', ...userArgs]
41
+ : userArgs;
42
+
43
+ execFileSync(clickerPath, args, { stdio: 'inherit' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibium",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Browser automation for AI agents and humans",
5
5
  "keywords": [
6
6
  "browser",
@@ -36,18 +36,24 @@
36
36
  }
37
37
  },
38
38
  "bin": {
39
- "vibium": "./bin.js"
39
+ "vibe-check": "bin/cli.js"
40
40
  },
41
41
  "scripts": {
42
42
  "postinstall": "node postinstall.js"
43
43
  },
44
- "files": ["dist", "bin.js", "postinstall.js", "LICENSE", "NOTICE"],
44
+ "files": [
45
+ "dist",
46
+ "bin",
47
+ "postinstall.js",
48
+ "LICENSE",
49
+ "NOTICE"
50
+ ],
45
51
  "optionalDependencies": {
46
- "@vibium/linux-x64": "0.1.4",
47
- "@vibium/linux-arm64": "0.1.4",
48
- "@vibium/darwin-x64": "0.1.4",
49
- "@vibium/darwin-arm64": "0.1.4",
50
- "@vibium/win32-x64": "0.1.4"
52
+ "@vibium/linux-x64": "0.1.6",
53
+ "@vibium/linux-arm64": "0.1.6",
54
+ "@vibium/darwin-x64": "0.1.6",
55
+ "@vibium/darwin-arm64": "0.1.6",
56
+ "@vibium/win32-x64": "0.1.6"
51
57
  },
52
58
  "dependencies": {
53
59
  "ws": "^8.18.3"
package/bin.js DELETED
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- // Find clicker binary from platform package and run `clicker mcp`
3
-
4
- const { execFileSync } = require('child_process');
5
- const path = require('path');
6
- const os = require('os');
7
-
8
- function getClickerPath() {
9
- const platform = os.platform();
10
- const arch = os.arch() === 'x64' ? 'x64' : 'arm64';
11
- const packageName = `@vibium/${platform}-${arch}`;
12
- const binaryName = platform === 'win32' ? 'clicker.exe' : 'clicker';
13
-
14
- try {
15
- const packagePath = require.resolve(`${packageName}/package.json`);
16
- return path.join(path.dirname(packagePath), 'bin', binaryName);
17
- } catch {
18
- console.error(`Could not find clicker binary for ${platform}-${arch}`);
19
- process.exit(1);
20
- }
21
- }
22
-
23
- const clickerPath = getClickerPath();
24
- execFileSync(clickerPath, ['mcp'], { stdio: 'inherit' });