compact-agent 1.15.0 → 1.16.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.
@@ -0,0 +1,35 @@
1
+ /**
2
+ * apply_patch — multi-file diff tool inspired by OpenAI codex-cli.
3
+ *
4
+ * One tool call instead of N edit_file/write_file calls. The envelope
5
+ * format is self-describing so the model can batch related changes
6
+ * (renames, adds, deletes, edits) into a single auditable diff:
7
+ *
8
+ * *** Begin Patch
9
+ * *** Update File: src/foo.ts
10
+ * @@ class Foo
11
+ * - oldLine
12
+ * + newLine
13
+ * *** Add File: src/bar.ts
14
+ * +contents line 1
15
+ * +contents line 2
16
+ * *** Delete File: src/old.ts
17
+ * *** Move to: src/other.ts
18
+ * *** End Patch
19
+ *
20
+ * Why this is better than chained edit_file calls:
21
+ * - One permission prompt covering the whole refactor
22
+ * - The diff is reviewable as a unit; no half-applied state
23
+ * - Renames + content edits in the same call (rare-but-real refactor pattern)
24
+ * - Multi-file refactors cost one tool round-trip
25
+ *
26
+ * Parser notes:
27
+ * - Lines starting with `*** ` are control lines (begin/end/file ops)
28
+ * - Hunk header lines start with `@@` — symbol anchor or line number
29
+ * - Body lines start with `-` (remove), `+` (add), or ` ` (context)
30
+ * - We require minimum 2 chars context (or `@@` anchor) for each hunk
31
+ * - Match validation: every `-` line must be findable in the current
32
+ * file content; otherwise the whole patch rejects (no partial apply)
33
+ */
34
+ import type { Tool } from './types.js';
35
+ export declare const ApplyPatchTool: Tool;
@@ -0,0 +1,324 @@
1
+ /**
2
+ * apply_patch — multi-file diff tool inspired by OpenAI codex-cli.
3
+ *
4
+ * One tool call instead of N edit_file/write_file calls. The envelope
5
+ * format is self-describing so the model can batch related changes
6
+ * (renames, adds, deletes, edits) into a single auditable diff:
7
+ *
8
+ * *** Begin Patch
9
+ * *** Update File: src/foo.ts
10
+ * @@ class Foo
11
+ * - oldLine
12
+ * + newLine
13
+ * *** Add File: src/bar.ts
14
+ * +contents line 1
15
+ * +contents line 2
16
+ * *** Delete File: src/old.ts
17
+ * *** Move to: src/other.ts
18
+ * *** End Patch
19
+ *
20
+ * Why this is better than chained edit_file calls:
21
+ * - One permission prompt covering the whole refactor
22
+ * - The diff is reviewable as a unit; no half-applied state
23
+ * - Renames + content edits in the same call (rare-but-real refactor pattern)
24
+ * - Multi-file refactors cost one tool round-trip
25
+ *
26
+ * Parser notes:
27
+ * - Lines starting with `*** ` are control lines (begin/end/file ops)
28
+ * - Hunk header lines start with `@@` — symbol anchor or line number
29
+ * - Body lines start with `-` (remove), `+` (add), or ` ` (context)
30
+ * - We require minimum 2 chars context (or `@@` anchor) for each hunk
31
+ * - Match validation: every `-` line must be findable in the current
32
+ * file content; otherwise the whole patch rejects (no partial apply)
33
+ */
34
+ import { readFileSync, writeFileSync, unlinkSync, existsSync, mkdirSync } from 'node:fs';
35
+ import { dirname } from 'node:path';
36
+ import { resolveUserPath } from './path-utils.js';
37
+ /**
38
+ * Parse the envelope into a list of file ops. Throws on malformed input
39
+ * with a clear message — the model can read the error and retry.
40
+ */
41
+ function parsePatch(text, cwd) {
42
+ const lines = text.split(/\r?\n/);
43
+ let i = 0;
44
+ // Skip leading blanks
45
+ while (i < lines.length && lines[i].trim() === '')
46
+ i++;
47
+ if (i >= lines.length || lines[i].trim() !== '*** Begin Patch') {
48
+ throw new Error('apply_patch: envelope must start with "*** Begin Patch"');
49
+ }
50
+ i++;
51
+ const ops = [];
52
+ let current = null;
53
+ let hunk = null;
54
+ function flushHunk() {
55
+ if (current && current.kind === 'update' && hunk && (hunk.oldLines.length > 0 || hunk.newLines.length > 0)) {
56
+ current.hunks = current.hunks || [];
57
+ current.hunks.push(hunk);
58
+ }
59
+ hunk = null;
60
+ }
61
+ function flushOp() {
62
+ flushHunk();
63
+ if (current)
64
+ ops.push(current);
65
+ current = null;
66
+ }
67
+ while (i < lines.length) {
68
+ const line = lines[i];
69
+ const trimmed = line.trimEnd(); // preserve leading whitespace
70
+ if (trimmed === '*** End Patch') {
71
+ flushOp();
72
+ return ops;
73
+ }
74
+ if (trimmed.startsWith('*** Update File: ')) {
75
+ flushOp();
76
+ current = { kind: 'update', path: resolveUserPath(cwd, trimmed.slice('*** Update File: '.length).trim()), hunks: [] };
77
+ hunk = null;
78
+ i++;
79
+ continue;
80
+ }
81
+ if (trimmed.startsWith('*** Add File: ')) {
82
+ flushOp();
83
+ current = { kind: 'add', path: resolveUserPath(cwd, trimmed.slice('*** Add File: '.length).trim()), content: '' };
84
+ i++;
85
+ continue;
86
+ }
87
+ if (trimmed.startsWith('*** Delete File: ')) {
88
+ flushOp();
89
+ current = { kind: 'delete', path: resolveUserPath(cwd, trimmed.slice('*** Delete File: '.length).trim()) };
90
+ i++;
91
+ continue;
92
+ }
93
+ if (trimmed.startsWith('*** Move to: ')) {
94
+ // Move applies to the *current* update op (rare but supported)
95
+ if (!current || current.kind !== 'update') {
96
+ throw new Error(`apply_patch: "*** Move to:" must follow "*** Update File:" (line ${i + 1})`);
97
+ }
98
+ current.kind = 'move';
99
+ current.movePath = resolveUserPath(cwd, trimmed.slice('*** Move to: '.length).trim());
100
+ i++;
101
+ continue;
102
+ }
103
+ // Hunk header for Update / Move ops
104
+ if (trimmed.startsWith('@@') && current && (current.kind === 'update' || current.kind === 'move')) {
105
+ flushHunk();
106
+ hunk = { anchor: trimmed.slice(2).trim() || undefined, oldLines: [], newLines: [] };
107
+ i++;
108
+ continue;
109
+ }
110
+ // Body lines
111
+ if (current?.kind === 'add') {
112
+ // Add-file body: every non-empty line should start with '+', but be lenient
113
+ if (line.startsWith('+'))
114
+ current.content = (current.content || '') + line.slice(1) + '\n';
115
+ else if (line === '')
116
+ current.content = (current.content || '') + '\n';
117
+ else
118
+ throw new Error(`apply_patch: Add File body must start with '+' (line ${i + 1}: "${line.slice(0, 60)}")`);
119
+ i++;
120
+ continue;
121
+ }
122
+ if (current?.kind === 'update' || current?.kind === 'move') {
123
+ if (!hunk) {
124
+ // Allow implicit hunk if first body line is a diff line
125
+ if (line.startsWith('+') || line.startsWith('-') || line.startsWith(' ')) {
126
+ hunk = { oldLines: [], newLines: [] };
127
+ }
128
+ else {
129
+ // Unrelated line — skip (e.g. blank between header and hunk)
130
+ i++;
131
+ continue;
132
+ }
133
+ }
134
+ if (line.startsWith('-'))
135
+ hunk.oldLines.push(line.slice(1));
136
+ else if (line.startsWith('+'))
137
+ hunk.newLines.push(line.slice(1));
138
+ else if (line.startsWith(' ')) {
139
+ hunk.oldLines.push(line.slice(1));
140
+ hunk.newLines.push(line.slice(1));
141
+ }
142
+ else if (line === '') {
143
+ hunk.oldLines.push('');
144
+ hunk.newLines.push('');
145
+ }
146
+ else
147
+ throw new Error(`apply_patch: unrecognized hunk line (line ${i + 1}: "${line.slice(0, 60)}")`);
148
+ i++;
149
+ continue;
150
+ }
151
+ // Outside any op — skip blanks, error on stray content
152
+ if (line.trim() === '') {
153
+ i++;
154
+ continue;
155
+ }
156
+ throw new Error(`apply_patch: stray content outside any file op (line ${i + 1}: "${line.slice(0, 60)}")`);
157
+ }
158
+ throw new Error('apply_patch: envelope did not end with "*** End Patch"');
159
+ }
160
+ /**
161
+ * Apply one hunk to a file's current content. Returns the new content
162
+ * or throws if the hunk doesn't match.
163
+ */
164
+ function applyHunk(content, hunk) {
165
+ const oldBlock = hunk.oldLines.join('\n');
166
+ const newBlock = hunk.newLines.join('\n');
167
+ if (oldBlock === '') {
168
+ // Pure insertion — append at end (or at anchor if specified)
169
+ return content + (content.endsWith('\n') ? '' : '\n') + newBlock + '\n';
170
+ }
171
+ // Locate the old block. We use exact substring match for safety.
172
+ let idx = content.indexOf(oldBlock);
173
+ if (idx === -1) {
174
+ // Try a more forgiving match: collapse whitespace
175
+ const flexible = oldBlock.replace(/\s+/g, ' ').trim();
176
+ const collapsed = content.replace(/\s+/g, ' ');
177
+ const ci = collapsed.indexOf(flexible);
178
+ if (ci === -1) {
179
+ throw new Error(`apply_patch: hunk did not match file. Looking for:\n---\n${oldBlock.slice(0, 200)}\n---`);
180
+ }
181
+ throw new Error(`apply_patch: hunk only matches with whitespace differences — clean up the diff to match exactly`);
182
+ }
183
+ // Disambiguate if the old block appears multiple times: require anchor
184
+ const next = content.indexOf(oldBlock, idx + 1);
185
+ if (next !== -1 && !hunk.anchor) {
186
+ throw new Error(`apply_patch: hunk matches in multiple places — add an @@ anchor line above the change`);
187
+ }
188
+ if (next !== -1 && hunk.anchor) {
189
+ // Prefer the occurrence closest to the anchor symbol
190
+ const anchorIdx = content.indexOf(hunk.anchor);
191
+ if (anchorIdx !== -1) {
192
+ // Find the occurrence with the closest preceding anchor
193
+ const occurrences = [];
194
+ let pos = content.indexOf(oldBlock);
195
+ while (pos !== -1) {
196
+ occurrences.push(pos);
197
+ pos = content.indexOf(oldBlock, pos + 1);
198
+ }
199
+ let best = occurrences[0];
200
+ let bestDist = Math.abs(best - anchorIdx);
201
+ for (const o of occurrences) {
202
+ const d = Math.abs(o - anchorIdx);
203
+ if (d < bestDist) {
204
+ best = o;
205
+ bestDist = d;
206
+ }
207
+ }
208
+ idx = best;
209
+ }
210
+ }
211
+ return content.slice(0, idx) + newBlock + content.slice(idx + oldBlock.length);
212
+ }
213
+ /**
214
+ * Validate every op against the disk state. Throws on the first
215
+ * problem so we never apply a half-broken patch. This is the "validate
216
+ * then commit" boundary.
217
+ */
218
+ function validate(ops) {
219
+ for (const op of ops) {
220
+ if (op.kind === 'add') {
221
+ if (existsSync(op.path)) {
222
+ throw new Error(`apply_patch: cannot Add File "${op.path}" — already exists. Use Update File instead.`);
223
+ }
224
+ }
225
+ else if (op.kind === 'update' || op.kind === 'move') {
226
+ if (!existsSync(op.path)) {
227
+ throw new Error(`apply_patch: cannot Update File "${op.path}" — does not exist. Use Add File for new files.`);
228
+ }
229
+ if (op.kind === 'move' && !op.movePath) {
230
+ throw new Error(`apply_patch: Move op requires a destination path`);
231
+ }
232
+ // Dry-apply all hunks to surface mismatches before any write
233
+ let content = readFileSync(op.path, 'utf-8');
234
+ for (const h of op.hunks || []) {
235
+ content = applyHunk(content, h);
236
+ }
237
+ }
238
+ else if (op.kind === 'delete') {
239
+ if (!existsSync(op.path)) {
240
+ throw new Error(`apply_patch: cannot Delete File "${op.path}" — does not exist`);
241
+ }
242
+ }
243
+ }
244
+ }
245
+ /**
246
+ * Apply the validated ops. Mutates disk. Run validate() first.
247
+ */
248
+ function commit(ops) {
249
+ const log = [];
250
+ for (const op of ops) {
251
+ if (op.kind === 'add') {
252
+ mkdirSync(dirname(op.path), { recursive: true });
253
+ writeFileSync(op.path, op.content || '', 'utf-8');
254
+ const lines = (op.content || '').split('\n').length;
255
+ log.push(`+ ${op.path} (${lines} lines)`);
256
+ }
257
+ else if (op.kind === 'update') {
258
+ let content = readFileSync(op.path, 'utf-8');
259
+ for (const h of op.hunks || [])
260
+ content = applyHunk(content, h);
261
+ writeFileSync(op.path, content, 'utf-8');
262
+ const hunkCount = (op.hunks || []).length;
263
+ log.push(`~ ${op.path} (${hunkCount} hunk${hunkCount === 1 ? '' : 's'})`);
264
+ }
265
+ else if (op.kind === 'move') {
266
+ let content = readFileSync(op.path, 'utf-8');
267
+ for (const h of op.hunks || [])
268
+ content = applyHunk(content, h);
269
+ mkdirSync(dirname(op.movePath), { recursive: true });
270
+ writeFileSync(op.movePath, content, 'utf-8');
271
+ unlinkSync(op.path);
272
+ log.push(`~ ${op.path} → ${op.movePath}`);
273
+ }
274
+ else if (op.kind === 'delete') {
275
+ unlinkSync(op.path);
276
+ log.push(`- ${op.path}`);
277
+ }
278
+ }
279
+ return log.join('\n');
280
+ }
281
+ export const ApplyPatchTool = {
282
+ name: 'apply_patch',
283
+ description: 'Apply a multi-file patch as a single atomic operation. Use this for ' +
284
+ 'refactors touching 2+ files, file renames, or any change you would have ' +
285
+ 'made with multiple edit_file/write_file calls. Format:\n\n' +
286
+ '*** Begin Patch\n' +
287
+ '*** Update File: src/foo.ts\n' +
288
+ '@@ class Foo\n' +
289
+ '- oldLine\n' +
290
+ '+ newLine\n' +
291
+ '*** Add File: src/bar.ts\n' +
292
+ '+contents line 1\n' +
293
+ '+contents line 2\n' +
294
+ '*** Delete File: src/old.ts\n' +
295
+ '*** End Patch\n\n' +
296
+ 'Rules: validate-then-commit (any hunk mismatch rejects the whole patch); ' +
297
+ 'Update File requires the target to exist; Add File requires the target NOT ' +
298
+ 'to exist; @@ anchors disambiguate when the old block matches multiple places; ' +
299
+ 'do NOT re-read the file after this tool returns — the changes are on disk.',
300
+ parameters: {
301
+ type: 'object',
302
+ properties: {
303
+ patch: { type: 'string', description: 'The envelope text, beginning with "*** Begin Patch"' },
304
+ },
305
+ required: ['patch'],
306
+ },
307
+ isReadOnly: false,
308
+ isDestructive: true,
309
+ async call(input, cwd) {
310
+ try {
311
+ const ops = parsePatch(input.patch, cwd);
312
+ if (ops.length === 0)
313
+ return { output: 'apply_patch: empty patch (no file ops).', isError: false };
314
+ validate(ops);
315
+ const log = commit(ops);
316
+ return { output: `Applied ${ops.length} file op(s):\n${log}`, isError: false };
317
+ }
318
+ catch (e) {
319
+ const msg = e instanceof Error ? e.message : String(e);
320
+ return { output: msg, isError: true };
321
+ }
322
+ },
323
+ };
324
+ //# sourceMappingURL=apply-patch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-patch.js","sourceRoot":"","sources":["../../src/tools/apply-patch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAc,MAAM,SAAS,CAAC;AACrG,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAkBlD;;;GAGG;AACH,SAAS,UAAU,CAAC,IAAY,EAAE,GAAW;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAClC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,sBAAsB;IACtB,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H,CAAC;CACF,CAAC"}
@@ -12,6 +12,7 @@ import { stitchConfigured } from '../stitch.js';
12
12
  import { MEMORY_TOOLS } from './memory.js';
13
13
  import { isMemoryEnabled } from '../mempalace/index.js';
14
14
  import { SkillViewTool } from './skill.js';
15
+ import { ApplyPatchTool } from './apply-patch.js';
15
16
  // Stitch is only listed in the tool registry when configured — otherwise
16
17
  // free models hallucinate calls to it and waste turns on auth errors.
17
18
  const OPTIONAL_TOOLS = [];
@@ -28,6 +29,9 @@ export const ALL_TOOLS = [
28
29
  ReadTool,
29
30
  WriteTool,
30
31
  EditTool,
32
+ // apply_patch — multi-file atomic edits (replaces chained edit/write
33
+ // for refactors). Inspired by codex-cli's *** Begin Patch envelope.
34
+ ApplyPatchTool,
31
35
  GrepTool,
32
36
  GlobTool,
33
37
  ListDirTool,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC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Y;IACxC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAChD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compact-agent",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "A dense, feature-rich AI coding agent for the terminal. Built-in voice dictation (Whisper) + TTS readout (ElevenLabs) + screen-reader mode for blind / low-vision users. 80+ slash commands, 9 modes including Hermes self-improving loop, multi-agent orchestration, bundled everything-claude-code skills library, learning system, and observable LLM transport. Works with OpenRouter, OpenAI, Anthropic-compatible, Ollama, LM Studio, DeepSeek, or any OpenAI-compatible API.",
5
5
  "type": "module",
6
6
  "license": "MIT",