@proxysoul/soulforge 1.3.8 → 1.4.0

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/index.js +14 -56
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -57814,7 +57814,7 @@ var package_default;
57814
57814
  var init_package = __esm(() => {
57815
57815
  package_default = {
57816
57816
  name: "@proxysoul/soulforge",
57817
- version: "1.3.8",
57817
+ version: "1.4.0",
57818
57818
  description: "Graph-powered code intelligence \u2014 multi-agent coding with codebase-aware AI",
57819
57819
  repository: {
57820
57820
  type: "git",
@@ -62243,7 +62243,6 @@ function markToolWrite(filePath) {
62243
62243
  async function readBufferContent(filePath) {
62244
62244
  const toolWriteTime = recentToolWrites.get(filePath);
62245
62245
  if (toolWriteTime && Date.now() - toolWriteTime < TOOL_WRITE_FRESHNESS_MS) {
62246
- recentToolWrites.delete(filePath);
62247
62246
  return readFile3(filePath, "utf-8");
62248
62247
  }
62249
62248
  inflight++;
@@ -317553,7 +317552,7 @@ function buildRichEditError(content, oldStr, lineHint) {
317553
317552
  const escapeHint = backslashDensity > 0.05 ? `
317554
317553
  [Escape-heavy content detected \u2014 use lineStart for line-based replacement, or use editor(action: edit, startLine, endLine, replacement)]` : "";
317555
317554
  return {
317556
- output: `old_string not found in file (re-read performed \u2014 content below is current):
317555
+ output: `old_string not found in file. Current content at that region:
317557
317556
  ${snippet}${escapeHint}`
317558
317557
  };
317559
317558
  }
@@ -317713,7 +317712,7 @@ var init_edit_file = __esm(() => {
317713
317712
  init_file_events();
317714
317713
  editFileTool = {
317715
317714
  name: "edit_file",
317716
- description: "[TIER-1] Edit a file by replacing content. Read first, then provide path, oldString, newString. " + "Always provide lineStart (1-indexed from read_file output) \u2014 the range is derived from oldString line count. " + "Empty oldString creates a new file. Use multi_edit for multiple changes to the same file. Edits are applied immediately.",
317715
+ description: "[TIER-1] Edit a file by replacing content. Read first, then provide path, oldString, newString. " + "Provide lineStart (1-indexed from read_file output) for reliable line-anchored matching \u2014 " + "the range is derived from oldString line count. Without lineStart, falls back to string matching (fails if ambiguous). Empty oldString creates a new file. Use multi_edit for multiple changes to the same file. Edits are applied immediately.",
317717
317716
  execute: async (args2) => {
317718
317717
  try {
317719
317718
  const filePath = resolve13(args2.path);
@@ -334637,7 +334636,7 @@ var init_multi_edit = __esm(() => {
334637
334636
  init_file_events();
334638
334637
  multiEditTool = {
334639
334638
  name: "multi_edit",
334640
- description: "Apply multiple edits to a single file atomically. All-or-nothing validation. " + "Each edit's oldString and lineStart reference the ORIGINAL file \u2014 the tool handles offset tracking internally. " + "Always provide lineStart (1-indexed). The range is derived from oldString line count.",
334639
+ description: "Apply multiple edits to a single file atomically. All-or-nothing: if any edit fails, ZERO edits are applied. " + "lineStart values reference the ORIGINAL file (pre-edit) \u2014 the tool tracks cumulative line offsets internally. " + "Provide lineStart (1-indexed) for reliable line-anchored matching. Without it, falls back to string matching against evolved content. " + "The range is derived from oldString line count.",
334641
334640
  execute: async (args2) => {
334642
334641
  try {
334643
334642
  const filePath = resolve19(args2.path);
@@ -334681,7 +334680,6 @@ var init_multi_edit = __esm(() => {
334681
334680
  return a.lineStart - b.lineStart;
334682
334681
  });
334683
334682
  let lineOffset = 0;
334684
- const warnings = [];
334685
334683
  for (let i2 = 0;i2 < sortedEdits.length; i2++) {
334686
334684
  const edit = sortedEdits[i2];
334687
334685
  if (!edit)
@@ -334728,21 +334726,21 @@ var init_multi_edit = __esm(() => {
334728
334726
  `);
334729
334727
  return {
334730
334728
  success: false,
334731
- output: `Edit ${String(i2 + 1)}: oldString does not match lines ${String(edit.lineStart)}-${String((edit.lineStart ?? 0) + oldLineCount - 1)}. Actual content:
334729
+ output: `Edit ${String(i2 + 1)}/${String(args2.edits.length)} failed: oldString does not match lines ${String(edit.lineStart)}-${String((edit.lineStart ?? 0) + oldLineCount - 1)}. NO edits were applied (atomic rollback). Actual content at that range:
334732
334730
  ${rangeSnippet}
334733
- Re-read the file and retry with the correct content.`,
334734
- error: `edit ${String(i2 + 1)}: oldString mismatch at line range`
334731
+ Re-read the file and retry ALL edits.`,
334732
+ error: `edit ${String(i2 + 1)}: oldString mismatch at line range (0 edits applied)`
334735
334733
  };
334736
334734
  }
334737
334735
  }
334738
334736
  if (content.includes(edit.oldString)) {
334739
334737
  const occurrences = content.split(edit.oldString).length - 1;
334740
334738
  if (occurrences > 1) {
334741
- const msg = `${label}: found ${String(occurrences)} matches. Provide lineStart to disambiguate.`;
334739
+ const msg = `${label}: found ${String(occurrences)} matches. Provide lineStart to disambiguate. NO edits were applied (atomic rollback).`;
334742
334740
  return {
334743
334741
  success: false,
334744
334742
  output: msg,
334745
- error: msg
334743
+ error: `${label}: ambiguous match (0 edits applied)`
334746
334744
  };
334747
334745
  }
334748
334746
  const idx = content.indexOf(edit.oldString);
@@ -334767,8 +334765,9 @@ Re-read the file and retry with the correct content.`,
334767
334765
  const err2 = buildRichEditError(content, edit.oldString, adjustedLineStart);
334768
334766
  return {
334769
334767
  success: false,
334770
- output: `${label} failed: ${err2.output}`,
334771
- error: `edit ${String(i2 + 1)} failed`
334768
+ output: `${label} failed: ${err2.output}
334769
+ NO edits were applied (atomic rollback). Re-read the file and retry ALL edits.`,
334770
+ error: `edit ${String(i2 + 1)} failed (0 edits applied)`
334772
334771
  };
334773
334772
  }
334774
334773
  const beforeMetrics = analyzeFile(originalContent);
@@ -334794,11 +334793,11 @@ Re-read the file and retry with the correct content.`,
334794
334793
  }).catch(() => null);
334795
334794
  const currentOnDisk = await readFile13(filePath, "utf-8");
334796
334795
  if (currentOnDisk !== originalContent) {
334797
- const msg = "File was modified concurrently since last read. Re-read and retry.";
334796
+ const msg = "File was modified concurrently since last read. NO edits were applied (atomic rollback). Re-read and retry ALL edits.";
334798
334797
  return {
334799
334798
  success: false,
334800
334799
  output: msg,
334801
- error: "concurrent modification"
334800
+ error: "concurrent modification (0 edits applied)"
334802
334801
  };
334803
334802
  }
334804
334803
  pushEdit(filePath, originalContent, content, args2.tabId);
@@ -334818,10 +334817,6 @@ Re-read the file and retry with the correct content.`,
334818
334817
  deltas.push(`imports: ${String(beforeMetrics.importCount)}\u2192${String(afterMetrics.importCount)} (${sign}${String(importDelta)})`);
334819
334818
  }
334820
334819
  let output = `Applied ${String(args2.edits.length)} edits to ${args2.path}`;
334821
- if (warnings.length > 0)
334822
- output += `
334823
- \u26A0 ${warnings.join(`
334824
- \u26A0 `)}`;
334825
334820
  if (deltas.length > 0)
334826
334821
  output += ` (${deltas.join(", ")})`;
334827
334822
  const formatted = await autoFormatAfterEdit(filePath);
@@ -474859,8 +474854,6 @@ var init_SkillSearch = __esm(async () => {
474859
474854
  SkillSearch = import_react115.memo(function SkillSearch2({
474860
474855
  visible,
474861
474856
  contextManager,
474862
- agentSkillsEnabled,
474863
- onToggleAgentSkills,
474864
474857
  onClose,
474865
474858
  onSystemMessage
474866
474859
  }) {
@@ -475040,10 +475033,6 @@ var init_SkillSearch = __esm(async () => {
475040
475033
  resetScroll();
475041
475034
  return;
475042
475035
  }
475043
- if (evt.name === "a" && !evt.ctrl && !evt.meta && !query2) {
475044
- onToggleAgentSkills();
475045
- return;
475046
- }
475047
475036
  if (evt.name === "space") {
475048
475037
  setQuery((prev_3) => `${prev_3} `);
475049
475038
  resetScroll();
@@ -475469,32 +475458,6 @@ var init_SkillSearch = __esm(async () => {
475469
475458
  children: ""
475470
475459
  }, undefined, false, undefined, this)
475471
475460
  }, undefined, false, undefined, this),
475472
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
475473
- w: innerW,
475474
- children: [
475475
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
475476
- fg: t2.textMuted,
475477
- bg: POPUP_BG,
475478
- children: [
475479
- "Agent access:",
475480
- " "
475481
- ]
475482
- }, undefined, true, undefined, this),
475483
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
475484
- fg: agentSkillsEnabled ? t2.success : t2.error,
475485
- bg: POPUP_BG,
475486
- children: agentSkillsEnabled ? "on" : "off"
475487
- }, undefined, false, undefined, this),
475488
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
475489
- fg: t2.textDim,
475490
- bg: POPUP_BG,
475491
- children: [
475492
- " ",
475493
- "(a to toggle)"
475494
- ]
475495
- }, undefined, true, undefined, this)
475496
- ]
475497
- }, undefined, true, undefined, this),
475498
475461
  /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
475499
475462
  w: innerW,
475500
475463
  children: /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
@@ -477061,11 +477024,6 @@ function App({
477061
477024
  /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(SkillSearch, {
477062
477025
  visible: modalSkillSearch,
477063
477026
  contextManager: tabMgr.getActiveChat()?.contextManager ?? contextManager,
477064
- agentSkillsEnabled: !toolsState.disabledTools.has("skills"),
477065
- onToggleAgentSkills: () => {
477066
- toolsState.toggleTool("skills");
477067
- addSystemMessage(`Agent skills ${toolsState.disabledTools.has("skills") ? "enabled" : "disabled"}`);
477068
- },
477069
477027
  onClose: getCloser2("skillSearch"),
477070
477028
  onSystemMessage: addSystemMessage
477071
477029
  }, undefined, false, undefined, this),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proxysoul/soulforge",
3
- "version": "1.3.8",
3
+ "version": "1.4.0",
4
4
  "description": "Graph-powered code intelligence — multi-agent coding with codebase-aware AI",
5
5
  "repository": {
6
6
  "type": "git",