rird 1.1.6 → 1.1.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.
Files changed (2) hide show
  1. package/bin/rird +18 -1
  2. package/package.json +1 -1
package/bin/rird CHANGED
@@ -275,12 +275,29 @@ if (command === "activate") {
275
275
  }
276
276
  }
277
277
 
278
+ const rirdHome = process.env.RIRD_HOME || path.join(os.homedir(), ".rird")
279
+ const engineDir = path.join(rirdHome, "engine")
280
+ const brainDir = path.join(rirdHome, "brain")
281
+
282
+ // Use engine config (from postinstall with MCP) if it exists, otherwise brain
283
+ const engineConfig = path.join(engineDir, "rird.json")
284
+ const brainConfig = path.join(brainDir, "rird.json")
285
+ const configPath = fs.existsSync(engineConfig) ? engineConfig : brainConfig
286
+ const workDir = fs.existsSync(engineConfig) ? engineDir : brainDir
287
+
288
+ const env = { ...process.env }
289
+ env.RIRD_CONFIG = configPath
290
+ env.RIRD_ENGINE_DIR = workDir
291
+ // Enable RIRD search tools
292
+ env.RIRD_ENABLE_SEARCH = "true"
293
+
294
+ const args = process.argv.slice(2)
295
+
278
296
  const resolved = findBinary(scriptDir)
279
297
  if (!resolved) {
280
298
  // FALLBACK: If binary not found, try to run from source if in dev tree
281
299
  const sourceIndex = path.join(scriptDir, "..", "src", "index.ts")
282
300
  if (fs.existsSync(sourceIndex)) {
283
- const args = process.argv.slice(2)
284
301
  childProcess.spawnSync("bun", ["run", "--conditions=browser", sourceIndex, ...args], {
285
302
  stdio: "inherit",
286
303
  env: env,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "name": "rird",
5
5
  "type": "module",
6
6
  "scripts": {