rird-ai 2.3.8 → 2.3.10

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 (2) hide show
  1. package/package.json +12 -12
  2. package/postinstall.mjs +57 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rird-ai",
3
- "version": "2.3.8",
3
+ "version": "2.3.10",
4
4
  "description": "RIRD - Computer Use Agent for work automation",
5
5
  "bin": {
6
6
  "rird": "./bin/rird"
@@ -9,17 +9,17 @@
9
9
  "postinstall": "node ./postinstall.mjs"
10
10
  },
11
11
  "optionalDependencies": {
12
- "rird-darwin-arm64": "2.3.8",
13
- "rird-darwin-x64": "2.3.8",
14
- "rird-darwin-x64-baseline": "2.3.8",
15
- "rird-linux-arm64": "2.3.8",
16
- "rird-linux-arm64-musl": "2.3.8",
17
- "rird-linux-x64": "2.3.8",
18
- "rird-linux-x64-baseline": "2.3.8",
19
- "rird-linux-x64-baseline-musl": "2.3.8",
20
- "rird-linux-x64-musl": "2.3.8",
21
- "rird-windows-x64": "2.3.8",
22
- "rird-windows-x64-baseline": "2.3.8"
12
+ "rird-darwin-arm64": "2.3.10",
13
+ "rird-darwin-x64": "2.3.10",
14
+ "rird-darwin-x64-baseline": "2.3.10",
15
+ "rird-linux-arm64": "2.3.10",
16
+ "rird-linux-arm64-musl": "2.3.10",
17
+ "rird-linux-x64": "2.3.10",
18
+ "rird-linux-x64-baseline": "2.3.10",
19
+ "rird-linux-x64-baseline-musl": "2.3.10",
20
+ "rird-linux-x64-musl": "2.3.10",
21
+ "rird-windows-x64": "2.3.10",
22
+ "rird-windows-x64-baseline": "2.3.10"
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",
package/postinstall.mjs CHANGED
@@ -19,7 +19,7 @@ const RIRD_HOME = process.env.RIRD_HOME || path.join(os.homedir(), ".rird")
19
19
  const BIN_DIR = path.join(RIRD_HOME, "bin")
20
20
  const ENGINE_DIR = path.join(RIRD_HOME, "engine")
21
21
  const VENV_DIR = path.join(RIRD_HOME, "venv")
22
- const MCP_DIR = path.join(ENGINE_DIR, "chrome-browser-mcp")
22
+ const MCP_DIR = path.join(ENGINE_DIR, "stealth-browser-mcp")
23
23
 
24
24
  // Installation mode: A = Browser + Files, B = Full Computer Use
25
25
  const INSTALL_MODE = process.env.RIRD_MODE || "A"
@@ -115,14 +115,14 @@ function installPythonDeps(pipCmd) {
115
115
  }
116
116
  }
117
117
 
118
- // Clone browser MCP (Chrome)
119
- function cloneChromeBrowserMcp() {
118
+ // Clone browser MCP (Stealth)
119
+ function cloneStealthBrowserMcp() {
120
120
  if (fs.existsSync(MCP_DIR)) {
121
- log("Chrome browser integration already installed")
121
+ log("Browser automation already installed")
122
122
  return true
123
123
  }
124
124
 
125
- log("Installing Chrome browser integration...")
125
+ log("Installing browser automation...")
126
126
 
127
127
  // Try git clone - use spawnSync for better cross-platform path handling
128
128
  if (execSafe("git --version")) {
@@ -133,7 +133,7 @@ function cloneChromeBrowserMcp() {
133
133
  shell: isWindows
134
134
  })
135
135
  if (result.status === 0 || fs.existsSync(MCP_DIR)) {
136
- log("Chrome browser integration installed")
136
+ log("Browser automation installed")
137
137
  return true
138
138
  }
139
139
  } catch (e) {
@@ -146,8 +146,8 @@ function cloneChromeBrowserMcp() {
146
146
  // Create placeholder for now
147
147
  fs.mkdirSync(path.join(MCP_DIR, "src"), { recursive: true })
148
148
  fs.writeFileSync(path.join(MCP_DIR, "src", "server.py"), `#!/usr/bin/env python3
149
- # Placeholder - install the Chrome browser integration repo into ~/.rird/engine/chrome-browser-mcp
150
- print("Chrome browser integration not installed. Install Git and re-run setup.")
149
+ # Placeholder - install the browser automation repo into ~/.rird/engine/stealth-browser-mcp
150
+ print("Browser automation not installed. Install Git and re-run setup.")
151
151
  `)
152
152
  return false
153
153
  }
@@ -274,14 +274,57 @@ if __name__ == "__main__":
274
274
  fs.writeFileSync(validatorPath, content)
275
275
  }
276
276
 
277
- // Create rird.json config
277
+ // Create or update rird.json config
278
278
  function createConfig(pythonCmd) {
279
279
  const configPath = path.join(ENGINE_DIR, "rird.json")
280
280
 
281
+ // Check if config already exists - if so, just ensure MCP is enabled
282
+ if (fs.existsSync(configPath)) {
283
+ try {
284
+ const existingConfig = JSON.parse(fs.readFileSync(configPath, "utf-8"))
285
+ let updated = false
286
+
287
+ // Ensure MCP section exists and all MCPs have enabled: true
288
+ if (existingConfig.mcp) {
289
+ for (const [name, mcp] of Object.entries(existingConfig.mcp)) {
290
+ if (mcp.enabled !== true) {
291
+ existingConfig.mcp[name].enabled = true
292
+ updated = true
293
+ log(`Enabled MCP: ${name}`)
294
+ }
295
+ }
296
+ }
297
+
298
+ // Add stealth-browser if missing
299
+ if (!existingConfig.mcp || !existingConfig.mcp["stealth-browser"]) {
300
+ existingConfig.mcp = existingConfig.mcp || {}
301
+ existingConfig.mcp["stealth-browser"] = {
302
+ type: "local",
303
+ command: [pythonCmd, path.join(MCP_DIR, "src", "server.py"), "--minimal"],
304
+ environment: { FASTMCP_DISABLE_BANNER: "1" },
305
+ timeout: 30000,
306
+ enabled: true
307
+ }
308
+ updated = true
309
+ log("Added stealth-browser MCP")
310
+ }
311
+
312
+ if (updated) {
313
+ fs.writeFileSync(configPath, JSON.stringify(existingConfig, null, 2))
314
+ log("Config updated")
315
+ } else {
316
+ log("Config already up to date")
317
+ }
318
+ return
319
+ } catch (e) {
320
+ log(`Could not parse existing config, creating new: ${e.message}`)
321
+ }
322
+ }
323
+
281
324
  log(`Creating config (Mode ${INSTALL_MODE})...`)
282
325
 
283
326
  const mcpConfig = {
284
- "chrome-browser": {
327
+ "stealth-browser": {
285
328
  type: "local",
286
329
  command: [pythonCmd, path.join(MCP_DIR, "src", "server.py"), "--minimal"],
287
330
  environment: {
@@ -289,7 +332,8 @@ function createConfig(pythonCmd) {
289
332
  PYTHONPATH: path.join(MCP_DIR, "src"),
290
333
  RIRD_PROXIES: "${ROYAL_PROXY}"
291
334
  },
292
- timeout: 30000
335
+ timeout: 30000,
336
+ enabled: true
293
337
  }
294
338
  }
295
339
 
@@ -541,8 +585,8 @@ async function main() {
541
585
  }
542
586
  }
543
587
 
544
- // Install browser MCP (Chrome)
545
- cloneChromeBrowserMcp()
588
+ // Install browser MCP (Stealth)
589
+ cloneStealthBrowserMcp()
546
590
 
547
591
  // Create license validator
548
592
  createLicenseValidator()