@neriros/ralphy 2.13.2 → 2.13.3

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 +127 -32
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -56407,7 +56407,7 @@ function log(msg) {
56407
56407
  // package.json
56408
56408
  var package_default = {
56409
56409
  name: "@neriros/ralphy",
56410
- version: "2.13.2",
56410
+ version: "2.13.3",
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",
@@ -56653,8 +56653,6 @@ async function parseArgs(argv) {
56653
56653
  let expectMaxRuntime = false;
56654
56654
  let expectMaxFailures = false;
56655
56655
  let expectMaxIterations = false;
56656
- let expectTimeout = false;
56657
- let expectPushInterval = false;
56658
56656
  let expectLinearTeam = false;
56659
56657
  let expectLinearAssignee = false;
56660
56658
  let expectPollInterval = false;
@@ -56717,14 +56715,6 @@ async function parseArgs(argv) {
56717
56715
  expectMaxIterations = false;
56718
56716
  continue;
56719
56717
  }
56720
- if (expectTimeout) {
56721
- expectTimeout = false;
56722
- continue;
56723
- }
56724
- if (expectPushInterval) {
56725
- expectPushInterval = false;
56726
- continue;
56727
- }
56728
56718
  if (expectLinearTeam) {
56729
56719
  result2.linearTeam = arg;
56730
56720
  expectLinearTeam = false;
@@ -56794,12 +56784,6 @@ async function parseArgs(argv) {
56794
56784
  case "--max-iterations":
56795
56785
  expectMaxIterations = true;
56796
56786
  break;
56797
- case "--timeout":
56798
- expectTimeout = true;
56799
- break;
56800
- case "--push-interval":
56801
- expectPushInterval = true;
56802
- break;
56803
56787
  case "--unlimited":
56804
56788
  result2.maxIterations = 0;
56805
56789
  break;
@@ -70206,23 +70190,145 @@ var RalphyConfigSchema = exports_external.object({
70206
70190
  model: "opus",
70207
70191
  linear: { postComments: true, updateEveryIterations: 10, indicators: {} }
70208
70192
  });
70193
+ function stripJsonComments(text) {
70194
+ return text.replace(/\/\/[^\n]*/g, "");
70195
+ }
70209
70196
  async function loadRalphyConfig(projectRoot) {
70210
70197
  const path = join10(projectRoot, "ralphy.config.json");
70211
70198
  const file = Bun.file(path);
70212
70199
  if (!await file.exists()) {
70213
70200
  return RalphyConfigSchema.parse({});
70214
70201
  }
70215
- const raw = await file.json();
70202
+ const text = await file.text();
70203
+ const raw = JSON.parse(stripJsonComments(text));
70216
70204
  return RalphyConfigSchema.parse(raw);
70217
70205
  }
70206
+ var DEFAULT_CONFIG_TEMPLATE = `{
70207
+ // How many tasks to run in parallel.
70208
+ "concurrency": 1,
70209
+
70210
+ // Seconds between polls for new Linear issues (agent mode).
70211
+ "pollIntervalSeconds": 60,
70212
+
70213
+ // Maximum iterations per task. 0 = unlimited.
70214
+ "maxIterationsPerTask": 0,
70215
+
70216
+ // Maximum cost in USD per task. 0 = unlimited.
70217
+ "maxCostUsdPerTask": 0,
70218
+
70219
+ // Maximum wall-clock minutes per task. 0 = unlimited.
70220
+ "maxRuntimeMinutesPerTask": 0,
70221
+
70222
+ // Stop a task after this many consecutive identical failures.
70223
+ "maxConsecutiveFailuresPerTask": 5,
70224
+
70225
+ // Seconds to wait between loop iterations (throttle).
70226
+ "iterationDelaySeconds": 0,
70227
+
70228
+ // Log the raw engine stream to stdout.
70229
+ "logRawStream": false,
70230
+
70231
+ // Pass --verbose to the ralph task sub-process.
70232
+ "taskVerbose": false,
70233
+
70234
+ // Run each task in an isolated git worktree.
70235
+ "useWorktree": false,
70236
+
70237
+ // Delete the worktree after a successful task.
70238
+ "cleanupWorktreeOnSuccess": false,
70239
+
70240
+ // Shell script to run inside the worktree before the task starts.
70241
+ // "setupScript": "bun install",
70242
+
70243
+ // Shell script to run inside the worktree after the task finishes.
70244
+ // "teardownScript": "bun run lint",
70245
+
70246
+ // Extra text appended to every task prompt.
70247
+ // "appendPrompt": "Always run tests before finishing.",
70248
+
70249
+ // Open a pull request after a task succeeds.
70250
+ "createPrOnSuccess": false,
70251
+
70252
+ // Base branch for pull requests.
70253
+ "prBaseBranch": "main",
70254
+
70255
+ // Let the agent attempt to fix CI failures after a PR is created.
70256
+ "fixCiOnFailure": false,
70257
+
70258
+ // Maximum number of CI-fix attempts per task.
70259
+ "maxCiFixAttempts": 5,
70260
+
70261
+ // Seconds between CI status polls.
70262
+ "ciPollIntervalSeconds": 30,
70263
+
70264
+ // Underlying engine: "claude" or "codex".
70265
+ "engine": "claude",
70266
+
70267
+ // Model tier: "haiku", "sonnet", or "opus".
70268
+ "model": "opus",
70269
+
70270
+ "linear": {
70271
+ // Linear team key to filter issues (e.g. "ENG"). Omit to match all teams.
70272
+ // "team": "ENG",
70273
+
70274
+ // Linear user to filter issues. Can be an email address or user ID.
70275
+ // Omit to match issues regardless of assignee.
70276
+ // "assignee": "dev@example.com",
70277
+
70278
+ // Post progress comments on the Linear issue while a task is running.
70279
+ "postComments": true,
70280
+
70281
+ // Post a progress update every N iterations. 0 disables. Requires postComments.
70282
+ "updateEveryIterations": 10,
70283
+
70284
+ // ---------------------------------------------------------------------------
70285
+ // Linear indicators \u2014 COMMENTED OUT BY DEFAULT
70286
+ //
70287
+ // Indicators map Ralph lifecycle events to Linear labels/statuses.
70288
+ // WARNING: Activating indicators will query AND mutate your Linear workspace.
70289
+ // Labels or statuses that do not already exist may be created automatically.
70290
+ // Review every value against your actual Linear workspace before enabling,
70291
+ // then replace the empty object below with the full indicators block.
70292
+ //
70293
+ // To activate, replace "indicators": {} with:
70294
+ //
70295
+ // "indicators": {
70296
+ // // Issues to pick up (any-of filter \u2014 Ralph will start working on these).
70297
+ // "getTodo": { "filter": [{ "type": "status", "value": "Todo" }] },
70298
+ //
70299
+ // // Issues already in flight (resume after restart).
70300
+ // "getInProgress": { "filter": [{ "type": "label", "value": "ralph:in-progress" }] },
70301
+ //
70302
+ // // Issues whose PR has a merge conflict (Ralph will attempt a re-fix run).
70303
+ // "getConflicted": { "filter": [{ "type": "label", "value": "ralph:conflict" }] },
70304
+ //
70305
+ // // Applied when Ralph picks up an issue.
70306
+ // "setInProgress": { "type": "label", "value": "ralph:in-progress" },
70307
+ //
70308
+ // // Applied on clean success.
70309
+ // "setDone": { "type": "status", "value": "In Review" },
70310
+ //
70311
+ // // Applied when the task exits with an error (quarantine signal).
70312
+ // "setError": { "type": "label", "value": "ralph:error" },
70313
+ //
70314
+ // // Applied when a PR merge conflict is detected.
70315
+ // "setConflicted": { "type": "label", "value": "ralph:conflict" },
70316
+ //
70317
+ // // Label-only marker(s) removed once the conflict is fixed.
70318
+ // // Note: only label-typed markers are valid here \u2014 status removal is not supported.
70319
+ // "clearConflicted": { "type": "label", "value": "ralph:conflict" }
70320
+ // }
70321
+ // ---------------------------------------------------------------------------
70322
+ "indicators": {}
70323
+ }
70324
+ }
70325
+ `;
70218
70326
  async function ensureRalphyConfig(projectRoot) {
70219
70327
  const path = join10(projectRoot, "ralphy.config.json");
70220
70328
  const file = Bun.file(path);
70221
70329
  if (await file.exists())
70222
70330
  return path;
70223
- const defaults2 = RalphyConfigSchema.parse({});
70224
- await Bun.write(path, JSON.stringify(defaults2, null, 2) + `
70225
- `);
70331
+ await Bun.write(path, DEFAULT_CONFIG_TEMPLATE);
70226
70332
  return path;
70227
70333
  }
70228
70334
 
@@ -71892,17 +71998,6 @@ PR: ${prUrl}` : ""
71892
71998
  postComments: cfg.linear.postComments,
71893
71999
  commentEveryIterations: cfg.linear.updateEveryIterations
71894
72000
  });
71895
- (async () => {
71896
- const legacy = Bun.file(projectLayout(projectRoot).agentStateFile);
71897
- if (await legacy.exists()) {
71898
- onLog(" legacy .ralph/agent-state.json detected \u2014 Linear is now the source of truth; deleting", "gray");
71899
- try {
71900
- await legacy.delete();
71901
- } catch (err) {
71902
- onLog(`! failed to delete legacy agent-state.json: ${err.message}`, "yellow");
71903
- }
71904
- }
71905
- })();
71906
72001
  const filterDesc = describeIndicators(indicators, team, assignee);
71907
72002
  return {
71908
72003
  coord,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neriros/ralphy",
3
- "version": "2.13.2",
3
+ "version": "2.13.3",
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",