@neriros/ralphy 2.10.1 → 2.10.2

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/dist/cli/index.js +36 -6
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -50838,7 +50838,7 @@ var require_axios = __commonJS((exports, module) => {
50838
50838
 
50839
50839
  // apps/cli/src/index.ts
50840
50840
  import { resolve, join as join17, dirname as dirname4 } from "path";
50841
- import { exists, mkdir as mkdir3, rm } from "fs/promises";
50841
+ import { exists as exists2, mkdir as mkdir3, rm } from "fs/promises";
50842
50842
 
50843
50843
  // node_modules/.bun/ink@5.2.1+1f88f629f0141b18/node_modules/ink/build/render.js
50844
50844
  import { Stream } from "stream";
@@ -56407,7 +56407,7 @@ function log(msg) {
56407
56407
  // package.json
56408
56408
  var package_default = {
56409
56409
  name: "@neriros/ralphy",
56410
- version: "2.10.1",
56410
+ version: "2.10.2",
56411
56411
  description: "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
56412
56412
  keywords: [
56413
56413
  "agent",
@@ -70849,6 +70849,31 @@ ${logs}
70849
70849
  // apps/cli/src/components/AgentMode.tsx
70850
70850
  var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
70851
70851
  import { join as join14 } from "path";
70852
+ import { exists } from "fs/promises";
70853
+ async function seedWorktreeMcpConfig(projectRoot, worktreeCwd) {
70854
+ const src = join14(projectRoot, ".mcp.json");
70855
+ if (!await exists(src))
70856
+ return;
70857
+ const dst = join14(worktreeCwd, ".mcp.json");
70858
+ if (await exists(dst))
70859
+ return;
70860
+ let parsed;
70861
+ try {
70862
+ parsed = await Bun.file(src).json();
70863
+ } catch {
70864
+ return;
70865
+ }
70866
+ const servers = parsed.mcpServers;
70867
+ if (servers && typeof servers === "object") {
70868
+ for (const cfg of Object.values(servers)) {
70869
+ if (Array.isArray(cfg.args)) {
70870
+ cfg.args = cfg.args.map((a) => typeof a === "string" && a.startsWith(".ralph/") ? join14(projectRoot, a) : a);
70871
+ }
70872
+ }
70873
+ }
70874
+ await Bun.write(dst, JSON.stringify(parsed, null, 2) + `
70875
+ `);
70876
+ }
70852
70877
  var bunGitRunner = {
70853
70878
  run: async (args, cwd2) => {
70854
70879
  const proc = Bun.spawn({ cmd: ["git", ...args], cwd: cwd2, stdout: "pipe", stderr: "pipe" });
@@ -71007,6 +71032,11 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
71007
71032
  scaffoldTasksDir = join14(wt.cwd, "openspec", "changes");
71008
71033
  scaffoldStatesDir = join14(wt.cwd, ".ralph", "tasks");
71009
71034
  appendLog(` ${issue.identifier} worktree: ${wt.cwd} (${wt.branch})`, "gray");
71035
+ try {
71036
+ await seedWorktreeMcpConfig(projectRoot, wt.cwd);
71037
+ } catch (err) {
71038
+ appendLog(`! seeding .mcp.json failed for ${issue.identifier}: ${err.message}`, "yellow");
71039
+ }
71010
71040
  } catch (err) {
71011
71041
  appendLog(`! worktree create failed for ${issue.identifier}: ${err.message} \u2014 falling back to project root`, "yellow");
71012
71042
  }
@@ -71671,7 +71701,7 @@ if (typeof globalThis.Bun === "undefined") {
71671
71701
  async function findProjectRoot() {
71672
71702
  let dir = process.cwd();
71673
71703
  while (dir !== "/") {
71674
- if (await exists(join17(dir, "openspec")))
71704
+ if (await exists2(join17(dir, "openspec")))
71675
71705
  return dir;
71676
71706
  dir = resolve(dir, "..");
71677
71707
  }
@@ -71728,7 +71758,7 @@ try {
71728
71758
  const stateDir = join17(statesDir, args.name);
71729
71759
  const branch = `ralph/${args.name}`;
71730
71760
  const removed = [];
71731
- if (await exists(worktreeDir)) {
71761
+ if (await exists2(worktreeDir)) {
71732
71762
  const proc = Bun.spawn({
71733
71763
  cmd: ["git", "worktree", "remove", "--force", worktreeDir],
71734
71764
  cwd: projectRoot,
@@ -71755,11 +71785,11 @@ try {
71755
71785
  });
71756
71786
  if (await branchProc.exited === 0)
71757
71787
  removed.push(`branch ${branch}`);
71758
- if (await exists(changeDir)) {
71788
+ if (await exists2(changeDir)) {
71759
71789
  await rm(changeDir, { recursive: true, force: true });
71760
71790
  removed.push(`openspec change ${changeDir}`);
71761
71791
  }
71762
- if (await exists(stateDir)) {
71792
+ if (await exists2(stateDir)) {
71763
71793
  await rm(stateDir, { recursive: true, force: true });
71764
71794
  removed.push(`task state ${stateDir}`);
71765
71795
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neriros/ralphy",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "description": "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
5
5
  "keywords": [
6
6
  "agent",