@neriros/ralphy 3.10.11 → 3.10.13

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 +34 -13
  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.10.11")
18932
- return "3.10.11";
18931
+ if ("3.10.13")
18932
+ return "3.10.13";
18933
18933
  } catch {}
18934
18934
  const dirsToTry = [];
18935
18935
  try {
@@ -81281,7 +81281,7 @@ function foldLegacyAssignee(v) {
81281
81281
  }
81282
81282
  return rest2;
81283
81283
  }
81284
- var CURRENT_WORKFLOW_VERSION = 4, MarkerSchema, SET_INDICATOR_KEYS, GetIndicatorSchema, SetIndicatorSchema, IndicatorsSchema, ProjectSchema, CommandsSchema, DEFAULT_META_ONLY_FILES, BoundariesSchema, WorkflowConfigSchema;
81284
+ var CURRENT_WORKFLOW_VERSION = 5, MarkerSchema, SET_INDICATOR_KEYS, GetIndicatorSchema, SetIndicatorSchema, IndicatorsSchema, ProjectSchema, CommandsSchema, DEFAULT_META_ONLY_FILES, BoundariesSchema, WorkflowConfigSchema;
81285
81285
  var init_schema = __esm(() => {
81286
81286
  init_zod();
81287
81287
  MarkerSchema = exports_external.discriminatedUnion("type", [
@@ -81430,6 +81430,7 @@ var init_schema = __esm(() => {
81430
81430
  syncTasksToComment: exports_external.boolean().default(true),
81431
81431
  syncSpecsAsAttachments: exports_external.boolean().default(true),
81432
81432
  specAttachmentFormats: exports_external.array(exports_external.enum(["md", "pdf"])).nonempty().default(["md"]),
81433
+ specAttachmentRevisions: exports_external.enum(["append", "replace"]).default("replace"),
81433
81434
  confirmationMode: exports_external.object({
81434
81435
  enabled: exports_external.boolean().default(false),
81435
81436
  timeoutHours: exports_external.number().positive().default(48),
@@ -81451,6 +81452,7 @@ var init_schema = __esm(() => {
81451
81452
  syncTasksToComment: true,
81452
81453
  syncSpecsAsAttachments: true,
81453
81454
  specAttachmentFormats: ["md"],
81455
+ specAttachmentRevisions: "replace",
81454
81456
  confirmationMode: {
81455
81457
  enabled: false,
81456
81458
  timeoutHours: 48,
@@ -81605,6 +81607,8 @@ linear:
81605
81607
  syncTasksToComment: true
81606
81608
  syncSpecsAsAttachments: true
81607
81609
  specAttachmentFormats: ["md"]
81610
+ # replace (default): overwrite the canonical design attachment in place; append: keep each sealed change as a new "#N" attachment
81611
+ specAttachmentRevisions: replace
81608
81612
  indicators:
81609
81613
  # Indicators map Ralph lifecycle events to Linear labels/statuses. Within an
81610
81614
  # indicator's \`filter:\` list, entries of the SAME type are ORed and entries
@@ -84448,6 +84452,11 @@ var init_migrations = __esm(() => {
84448
84452
  version: 4,
84449
84453
  description: "A new additive `setPrReady` Linear indicator marks a ticket the moment its " + "PR is human-mergeable (ready, non-draft), layered on top of `setDone`. " + "Re-run the indicator builder to add it, or keep your current indicators.",
84450
84454
  fields: ["linear.indicators"]
84455
+ },
84456
+ {
84457
+ version: 5,
84458
+ description: "A new `linear.specAttachmentRevisions` setting controls the sealed " + "design attachment: 'replace' (default) overwrites the single canonical " + "attachment in place; 'append' publishes each change as a new " + "'Ralph design #N' attachment. Config-file-only \u2014 set it in WORKFLOW.md " + "if you want the append audit trail.",
84459
+ fields: []
84451
84460
  }
84452
84461
  ];
84453
84462
  LATEST_MIGRATION_VERSION = MIGRATIONS.reduce((max2, migration) => Math.max(max2, migration.version), 0);
@@ -106150,6 +106159,7 @@ class AgentCoordinator {
106150
106159
  issueIdentifier: issue2.identifier,
106151
106160
  issue: issue2,
106152
106161
  trigger,
106162
+ ...prep.cwd ? { cwd: prep.cwd } : {},
106153
106163
  kill: handle.kill,
106154
106164
  lastReportedIteration: 0,
106155
106165
  lastSyncedIteration: 0,
@@ -106237,7 +106247,7 @@ class AgentCoordinator {
106237
106247
  exit_code: code,
106238
106248
  ok
106239
106249
  });
106240
- await this.notifyExited(issue2, prep.changeName, code, trigger);
106250
+ await this.notifyExited(issue2, prep.changeName, code, trigger, worker.cwd);
106241
106251
  this.deps.onWorkersChanged();
106242
106252
  this.spawnNext();
106243
106253
  }
@@ -106297,7 +106307,7 @@ class AgentCoordinator {
106297
106307
  this.deps.onLog(`! onSteeringAppended failed for ${changeName}: ${err.message}`, "yellow");
106298
106308
  }
106299
106309
  }
106300
- async notifyExited(issue2, changeName, code, trigger) {
106310
+ async notifyExited(issue2, changeName, code, trigger, workerCwd) {
106301
106311
  const noChanges = code === NO_CHANGES_EXIT;
106302
106312
  const ok = code === 0 || noChanges;
106303
106313
  const changeDir = this.deps.getChangeDir?.(issue2) ?? undefined;
@@ -106317,6 +106327,7 @@ class AgentCoordinator {
106317
106327
  issueIdentifier: issue2.identifier,
106318
106328
  issue: issue2,
106319
106329
  trigger,
106330
+ ...workerCwd ? { cwd: workerCwd } : {},
106320
106331
  kill: () => {},
106321
106332
  lastReportedIteration: 0,
106322
106333
  lastSyncedIteration: 0,
@@ -106929,7 +106940,9 @@ async function applyAwaitingMarkerOnce(issue2, statePath, state, deps) {
106929
106940
  }
106930
106941
  state.confirmation.awaitingMarkerAppliedAt = new Date().toISOString();
106931
106942
  try {
106932
- await writeConfirmationState(statePath, state.stateObj, state.confirmation);
106943
+ const fresh = await readConfirmationState(statePath);
106944
+ fresh.confirmation.awaitingMarkerAppliedAt = state.confirmation.awaitingMarkerAppliedAt;
106945
+ await writeConfirmationState(statePath, fresh.stateObj, fresh.confirmation);
106933
106946
  } catch (err) {
106934
106947
  deps.onLog(`! persist awaitingMarkerAppliedAt for ${issue2.identifier}: ${err.message}`, "yellow");
106935
106948
  }
@@ -106949,7 +106962,9 @@ async function openDraftPrOnce(issue2, statePath, changeName, cwd2, state, deps)
106949
106962
  }
106950
106963
  state.confirmation.earlyDraftPrAt = new Date().toISOString();
106951
106964
  try {
106952
- await writeConfirmationState(statePath, state.stateObj, state.confirmation);
106965
+ const fresh = await readConfirmationState(statePath);
106966
+ fresh.confirmation.earlyDraftPrAt = state.confirmation.earlyDraftPrAt;
106967
+ await writeConfirmationState(statePath, fresh.stateObj, fresh.confirmation);
106953
106968
  } catch (err) {
106954
106969
  deps.onLog(`! persist earlyDraftPrAt for ${issue2.identifier}: ${err.message}`, "yellow");
106955
106970
  }
@@ -107677,6 +107692,7 @@ function createPrepareHelpers(input) {
107677
107692
  }
107678
107693
  return {
107679
107694
  changeName,
107695
+ cwd: workerCwd,
107680
107696
  ...maps.prByChange.has(changeName) ? { prUrl: maps.prByChange.get(changeName) } : {}
107681
107697
  };
107682
107698
  }
@@ -262034,11 +262050,15 @@ ${body}
262034
262050
  offset += p.length;
262035
262051
  }
262036
262052
  const hash2 = sha256Hex(sourceBytes);
262053
+ const designOnlyHash = sha256Hex(primaryBytes);
262037
262054
  const state = await readSpecAttachments(deps.statePath);
262038
- if (await isDesignSealed(stateDirOf(deps.statePath))) {
262039
- await syncSlotSealed(deps, slot, sourceBytes, hash2, state);
262055
+ const sealed = await isDesignSealed(stateDirOf(deps.statePath));
262056
+ const mode = deps.sealedRevisionMode ?? "append";
262057
+ if (sealed && mode === "append") {
262058
+ await syncSlotSealed(deps, slot, sourceBytes, designOnlyHash, state);
262040
262059
  return;
262041
262060
  }
262061
+ const skipHash = sealed ? designOnlyHash : hash2;
262042
262062
  let current = state[slot] ?? EMPTY_SLOT;
262043
262063
  if (!current.attachmentId) {
262044
262064
  const { adoptedId } = await adopt(deps, slot);
@@ -262046,7 +262066,7 @@ ${body}
262046
262066
  current = { attachmentId: adoptedId, sha256: null };
262047
262067
  }
262048
262068
  }
262049
- if (current.attachmentId && current.sha256 === hash2) {
262069
+ if (current.attachmentId && current.sha256 === skipHash) {
262050
262070
  deps.log(` spec-attachments: ${spec.uploadFilename} unchanged, skipping`, "gray");
262051
262071
  return;
262052
262072
  }
@@ -262094,7 +262114,7 @@ ${body}
262094
262114
  deps.log(`! spec-attachments: createAttachmentForUrl ${spec.uploadFilename} failed: ${describeLinearError(err)}`, "yellow");
262095
262115
  return;
262096
262116
  }
262097
- await persistSlot(deps.statePath, slot, { attachmentId: newId, sha256: hash2 });
262117
+ await persistSlot(deps.statePath, slot, { attachmentId: newId, sha256: skipHash });
262098
262118
  deps.log(` spec-attachments: created ${spec.uploadFilename} attachment`, "gray");
262099
262119
  }
262100
262120
  async function purgeLegacyProposalSlots(deps) {
@@ -262202,7 +262222,7 @@ function createCommentSyncHooks(input) {
262202
262222
  return {
262203
262223
  enabled: enabled2,
262204
262224
  syncTasks: async (worker, iteration) => {
262205
- const root = cwdByChange.get(worker.changeName) ?? projectRoot;
262225
+ const root = worker.cwd ?? cwdByChange.get(worker.changeName) ?? projectRoot;
262206
262226
  const layout = projectLayout(root);
262207
262227
  const changeDir = layout.changeDir(worker.changeName);
262208
262228
  const statePath = layout.stateFile(worker.changeName);
@@ -262238,7 +262258,8 @@ function createCommentSyncHooks(input) {
262238
262258
  iteration,
262239
262259
  log: onLog,
262240
262260
  mutations: specAttachmentMutations,
262241
- formats: cfg.linear.specAttachmentFormats
262261
+ formats: cfg.linear.specAttachmentFormats,
262262
+ sealedRevisionMode: cfg.linear.specAttachmentRevisions
262242
262263
  });
262243
262264
  }
262244
262265
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neriros/ralphy",
3
- "version": "3.10.11",
3
+ "version": "3.10.13",
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",