@neriros/ralphy 3.11.0 → 3.11.1

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/shell/index.js +37 -16
  2. package/package.json +1 -1
@@ -18928,8 +18928,8 @@ import { readFileSync } from "fs";
18928
18928
  import { resolve } from "path";
18929
18929
  function getVersion() {
18930
18930
  try {
18931
- if ("3.11.0")
18932
- return "3.11.0";
18931
+ if ("3.11.1")
18932
+ return "3.11.1";
18933
18933
  } catch {}
18934
18934
  const dirsToTry = [];
18935
18935
  try {
@@ -33457,7 +33457,7 @@ var init_schema = __esm(() => {
33457
33457
  manualMergeWhenAutoMergeDisabled: exports_external.boolean().default(true),
33458
33458
  finalizeNoOpAsDone: exports_external.boolean().default(true),
33459
33459
  engine: exports_external.enum(["claude", "codex"]).default("claude"),
33460
- model: exports_external.enum(["opus", "sonnet", "haiku"]).default("opus"),
33460
+ model: exports_external.enum(["fable", "opus", "sonnet", "haiku"]).default("opus"),
33461
33461
  tracker: exports_external.object({
33462
33462
  kind: exports_external.enum(["linear", "github"]).default("linear")
33463
33463
  }).strict().default({ kind: "linear" }),
@@ -33524,7 +33524,7 @@ var init_schema = __esm(() => {
33524
33524
  }).strict().optional(),
33525
33525
  agent: exports_external.object({
33526
33526
  engine: exports_external.enum(["claude", "codex"]).optional(),
33527
- model: exports_external.enum(["haiku", "sonnet", "opus"]).optional(),
33527
+ model: exports_external.enum(["fable", "opus", "sonnet", "haiku"]).optional(),
33528
33528
  concurrency: exports_external.number().int().positive().optional(),
33529
33529
  max_iterations_per_task: exports_external.number().int().nonnegative().optional(),
33530
33530
  max_consecutive_failures: exports_external.number().int().nonnegative().optional()
@@ -85430,8 +85430,9 @@ var init_context = __esm(() => {
85430
85430
 
85431
85431
  // packages/config/src/config.ts
85432
85432
  function asWorkflowModel(value, fallback) {
85433
- if (value === "opus" || value === "sonnet" || value === "haiku")
85433
+ if (value === "fable" || value === "opus" || value === "sonnet" || value === "haiku") {
85434
85434
  return value;
85435
+ }
85435
85436
  return fallback;
85436
85437
  }
85437
85438
  function mergeConfig(workflow, overrides, explicitKeys = new Set) {
@@ -86019,8 +86020,8 @@ var init_cli = __esm(() => {
86019
86020
  " --workflow <path> Path to an alternate WORKFLOW.md (default: <project>/WORKFLOW.md)",
86020
86021
  " --prompt <text> Task description",
86021
86022
  " --prompt-file <path> Read prompt from file",
86022
- " --model <model> Set model (haiku|sonnet|opus)",
86023
- " --claude [model] Use Claude engine (haiku|sonnet|opus)",
86023
+ " --model <model> Set model (fable|opus|sonnet|haiku)",
86024
+ " --claude [model] Use Claude engine (fable|opus|sonnet|haiku)",
86024
86025
  " --codex Use Codex engine",
86025
86026
  " --delay <seconds> Seconds between iterations",
86026
86027
  " --max-iterations <n> Stop after N iterations (0 = unlimited)",
@@ -86105,8 +86106,8 @@ var init_task_cli = __esm(() => {
86105
86106
  " --workflow <path> Path to an alternate WORKFLOW.md (default: <project>/WORKFLOW.md)",
86106
86107
  " --prompt <text> Task description",
86107
86108
  " --prompt-file <path> Read prompt from file",
86108
- " --model <model> Set model (haiku|sonnet|opus)",
86109
- " --claude [model] Use Claude engine (haiku|sonnet|opus)",
86109
+ " --model <model> Set model (fable|opus|sonnet|haiku)",
86110
+ " --claude [model] Use Claude engine (fable|opus|sonnet|haiku)",
86110
86111
  " --codex Use Codex engine",
86111
86112
  " --delay <seconds> Seconds between iterations",
86112
86113
  " --max-iterations <n> Stop after N iterations (0 = unlimited)",
@@ -99179,8 +99180,11 @@ var init_rate_limit_detection = __esm(() => {
99179
99180
  import { mkdtemp, unlink as unlink2 } from "fs/promises";
99180
99181
  import { join as join14 } from "path";
99181
99182
  import { tmpdir } from "os";
99183
+ function resolveClaudeModel(model) {
99184
+ return model === "fable" ? "claude-fable-5" : model;
99185
+ }
99182
99186
  function buildClaudeArgs(model, resumeSessionId, reviewerContextStrategy, reviewerModel) {
99183
- const effectiveModel = reviewerModel ?? model;
99187
+ const effectiveModel = resolveClaudeModel(reviewerModel ?? model);
99184
99188
  const args = [
99185
99189
  "-p",
99186
99190
  "-",
@@ -99204,7 +99208,7 @@ async function runInteractive(req) {
99204
99208
  const cmd = [
99205
99209
  "claude",
99206
99210
  "--model",
99207
- model,
99211
+ resolveClaudeModel(model),
99208
99212
  "--dangerously-skip-permissions",
99209
99213
  [
99210
99214
  `Read the file ${promptFile} for background on the task.`,
@@ -103461,8 +103465,8 @@ var init_cli2 = __esm(() => {
103461
103465
  " --workflow <path> Path to an alternate WORKFLOW.md (default: <project>/WORKFLOW.md)",
103462
103466
  " --prompt <text> Task description appended to every scaffolded proposal",
103463
103467
  " --prompt-file <path> Read prompt from file",
103464
- " --model <model> Set model (haiku|sonnet|opus)",
103465
- " --claude [model] Use Claude engine (haiku|sonnet|opus, default: opus)",
103468
+ " --model <model> Set model (fable|opus|sonnet|haiku)",
103469
+ " --claude [model] Use Claude engine (fable|opus|sonnet|haiku, default: opus)",
103466
103470
  " --codex Use Codex engine",
103467
103471
  " --delay <seconds> Seconds between iterations",
103468
103472
  " --max-iterations <n> Stop after N iterations (0 = unlimited)",
@@ -104730,7 +104734,7 @@ ${existing.trimStart()}` : `${args.message}
104730
104734
  // apps/agent/src/agent/worktree.ts
104731
104735
  import { basename as basename2, join as join22 } from "path";
104732
104736
  import { homedir as homedir5 } from "os";
104733
- import { exists as exists3 } from "fs/promises";
104737
+ import { exists as exists3, rm as rm3 } from "fs/promises";
104734
104738
  function worktreesDir2(projectRoot) {
104735
104739
  return join22(homedir5(), ".ralph", basename2(projectRoot), "worktrees");
104736
104740
  }
@@ -104749,16 +104753,33 @@ function withRepoLock(projectRoot, fn) {
104749
104753
  function createWorktree(projectRoot, changeName, baseBranch, runner) {
104750
104754
  return withRepoLock(projectRoot, () => provisionWorktree(projectRoot, changeName, baseBranch, runner));
104751
104755
  }
104756
+ function worktreeRegistration(porcelain, cwd2) {
104757
+ for (const block of porcelain.split(`
104758
+
104759
+ `)) {
104760
+ const lines = block.split(`
104761
+ `);
104762
+ if (lines[0] !== `worktree ${cwd2}`)
104763
+ continue;
104764
+ return lines.some((l) => l.startsWith("prunable ")) ? "stale" : "live";
104765
+ }
104766
+ return "absent";
104767
+ }
104752
104768
  async function provisionWorktree(projectRoot, changeName, baseBranch, runner) {
104753
104769
  const dir = worktreesDir2(projectRoot);
104754
104770
  const cwd2 = join22(dir, changeName);
104755
104771
  const branch = branchForChange(changeName);
104756
104772
  const list = await runner.run(["worktree", "list", "--porcelain"], projectRoot);
104757
- if (list.stdout.includes(`worktree ${cwd2}
104758
- `)) {
104773
+ const registration = worktreeRegistration(list.stdout, cwd2);
104774
+ if (registration === "live") {
104759
104775
  await installPrePushHook(cwd2, runner);
104760
104776
  return { cwd: cwd2, branch, created: false };
104761
104777
  }
104778
+ if (registration === "stale") {
104779
+ await runner.run(["worktree", "prune"], projectRoot);
104780
+ if (await exists3(cwd2))
104781
+ await rm3(cwd2, { recursive: true, force: true });
104782
+ }
104762
104783
  let branchExists = true;
104763
104784
  try {
104764
104785
  await runner.run(["rev-parse", "--verify", "--quiet", `refs/heads/${branch}`], projectRoot);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neriros/ralphy",
3
- "version": "3.11.0",
3
+ "version": "3.11.1",
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",