@parall/cli 1.59.0 → 1.61.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 (53) hide show
  1. package/dist/commands/agents.d.ts +9 -0
  2. package/dist/commands/agents.d.ts.map +1 -1
  3. package/dist/commands/agents.js +288 -8
  4. package/dist/commands/approvals.d.ts.map +1 -1
  5. package/dist/commands/approvals.js +19 -0
  6. package/dist/commands/chats.d.ts.map +1 -1
  7. package/dist/commands/chats.js +84 -0
  8. package/dist/commands/comments.d.ts +3 -0
  9. package/dist/commands/comments.d.ts.map +1 -1
  10. package/dist/commands/comments.js +44 -1
  11. package/dist/commands/labels.d.ts +5 -0
  12. package/dist/commands/labels.d.ts.map +1 -0
  13. package/dist/commands/labels.js +114 -0
  14. package/dist/commands/messages.d.ts.map +1 -1
  15. package/dist/commands/messages.js +35 -0
  16. package/dist/commands/projects.d.ts.map +1 -1
  17. package/dist/commands/projects.js +4 -2
  18. package/dist/commands/search.d.ts +5 -0
  19. package/dist/commands/search.d.ts.map +1 -1
  20. package/dist/commands/search.js +28 -1
  21. package/dist/commands/tasks.d.ts +13 -3
  22. package/dist/commands/tasks.d.ts.map +1 -1
  23. package/dist/commands/tasks.js +214 -8
  24. package/dist/commands/watch.d.ts.map +1 -1
  25. package/dist/commands/watch.js +7 -5
  26. package/dist/commands/wiki-comments.d.ts +6 -0
  27. package/dist/commands/wiki-comments.d.ts.map +1 -0
  28. package/dist/commands/wiki-comments.js +108 -0
  29. package/dist/commands/wiki.d.ts.map +1 -1
  30. package/dist/commands/wiki.js +2 -98
  31. package/dist/index.js +2 -0
  32. package/dist/lib/wiki-index.d.ts +67 -0
  33. package/dist/lib/wiki-index.d.ts.map +1 -0
  34. package/dist/lib/wiki-index.js +758 -0
  35. package/dist/lib/wiki-merge.d.ts +113 -6
  36. package/dist/lib/wiki-merge.d.ts.map +1 -1
  37. package/dist/lib/wiki-merge.js +236 -31
  38. package/dist/lib/wiki-propose.d.ts +43 -0
  39. package/dist/lib/wiki-propose.d.ts.map +1 -0
  40. package/dist/lib/wiki-propose.js +335 -0
  41. package/dist/lib/wiki-shared.d.ts +291 -0
  42. package/dist/lib/wiki-shared.d.ts.map +1 -0
  43. package/dist/lib/wiki-shared.js +407 -0
  44. package/dist/lib/wiki-sync.d.ts +109 -0
  45. package/dist/lib/wiki-sync.d.ts.map +1 -0
  46. package/dist/lib/wiki-sync.js +637 -0
  47. package/dist/lib/wiki-workspace.d.ts +58 -0
  48. package/dist/lib/wiki-workspace.d.ts.map +1 -0
  49. package/dist/lib/wiki-workspace.js +255 -0
  50. package/dist/lib/wiki.d.ts +6 -312
  51. package/dist/lib/wiki.d.ts.map +1 -1
  52. package/dist/lib/wiki.js +53 -2208
  53. package/package.json +4 -4
@@ -2,16 +2,31 @@
2
2
  * Reconciling a local wiki workspace with a server that moved on:
3
3
  *
4
4
  * - a line-level three-way text merge, used by `wiki sync` when both the
5
- * server and the workspace changed the same file, so non-overlapping
6
- * edits merge instead of parking an upstream copy under conflicts/;
5
+ * server and the workspace changed the same file: non-overlapping edits
6
+ * merge silently, overlapping ones are written into the working file as
7
+ * `<<<<<<< mine (parall-merge)` / `======= (parall-merge)` /
8
+ * `>>>>>>> latest (parall-merge)` blocks — git's shape, the one every
9
+ * agent already knows how to edit, plus a tag so a quoted example of the
10
+ * block in the document is never mistaken for a delimiter;
11
+ * - the propose-time backstop that refuses a file still carrying such a
12
+ * block;
7
13
  * - the stale-base recovery policy `changeset create` follows before it
8
14
  * hands the situation back to the agent.
9
15
  *
10
16
  * Everything here is pure (no filesystem, no network) so the policy is
11
17
  * unit-testable without a mock wiki-service.
18
+ *
19
+ * Format twin: `ts/app/src/lib/wikiThreeWayMerge.ts` (the Web editor's draft
20
+ * merge, landing with PR #2724) is written to generate and recognise the exact
21
+ * same delimiter sets under the same rules. The two packages cannot share code
22
+ * (the CLI does not depend on the app), so each carries its own "format
23
+ * constants" test over one shared fixture; nothing here can enforce the other
24
+ * side. Keep them in lockstep: a human resolving in the browser and an agent
25
+ * resolving in a workspace must see, and be able to hand each other, the same
26
+ * bytes.
12
27
  */
13
28
  import { ApiError } from '@parall/sdk';
14
- import type { SyncConflict, WikiSyncOutcome } from './wiki.js';
29
+ import type { SyncConflict, WikiSyncOutcome } from './wiki-shared.js';
15
30
  /** Server error code: a file_change's base_sha no longer matches the default branch. */
16
31
  export declare const STALE_BASE_CODE = "STALE_BASE";
17
32
  /**
@@ -27,10 +42,61 @@ export type ThreeWayMergeResult = {
27
42
  } | {
28
43
  kind: 'conflict';
29
44
  conflictRegions: number;
45
+ /** Delimiter set (1-based) the blocks use — recorded by sync as the path's live set. */
46
+ set: number;
47
+ delimiters: ConflictDelimiters;
48
+ /**
49
+ * The document with every overlapping region wrapped in the document's
50
+ * own delimiter set (`<<<<<<< mine (parall-merge)` / `======= (parall-merge)`
51
+ * / `>>>>>>> latest (parall-merge)`, or a higher-numbered set when the
52
+ * content quotes that one) — non-overlapping hunks from both sides
53
+ * already merged around them. This is what `sync` writes into the
54
+ * working file.
55
+ */
56
+ marked: Buffer;
30
57
  } | {
31
58
  kind: 'not-mergeable';
32
- reason: 'binary' | 'lfs-pointer' | 'too-complex';
59
+ reason: 'binary' | 'lfs-pointer' | 'too-complex' | 'delimiter-sets-exhausted';
33
60
  };
61
+ /** Marker labels are agent-facing (they land in the working file). */
62
+ export declare const MERGE_LABEL_MINE = "mine";
63
+ export declare const MERGE_LABEL_THEIRS = "latest";
64
+ /** The three delimiter lines of one marker set (without line terminators). */
65
+ export interface ConflictDelimiters {
66
+ open: string;
67
+ sep: string;
68
+ close: string;
69
+ }
70
+ /**
71
+ * Delimiter set `n` (1-based). Set 1 is `<<<<<<< mine (parall-merge)` /
72
+ * `======= (parall-merge)` / `>>>>>>> latest (parall-merge)`; higher sets add
73
+ * `-n` to the tag, MIME-boundary style, and are only used when a document
74
+ * happens to contain set 1 verbatim (say, a wiki page documenting this very
75
+ * feature).
76
+ */
77
+ export declare function conflictDelimiters(n?: number): ConflictDelimiters;
78
+ /**
79
+ * Highest delimiter set this CLI generates or recognises. The set number is
80
+ * parsed with `Number()`, so an unbounded digit run in content could yield
81
+ * `Infinity` (which JSON-serialises to `null` and would blank the manifest's
82
+ * `conflict_set`) or lose integer precision (so `max + 1` would not move) —
83
+ * either way the guards would stop recognising the block sync itself wrote.
84
+ * Tags with more digits than this are content, and a document that already
85
+ * quotes set {@link MAX_CONFLICT_SET} cannot get an in-file merge at all: the
86
+ * merge reports `delimiter-sets-exhausted` and sync falls back to the
87
+ * `.remote` copy, exactly like binary content.
88
+ */
89
+ export declare const MAX_CONFLICT_SET = 999999;
90
+ /**
91
+ * Delimiter set for a document: one past the highest set any content line
92
+ * belongs to (any of the three shapes). Content can therefore only ever carry
93
+ * LOWER sets than the delimiters around it. Sync records the chosen set on the
94
+ * manifest entry (`conflict_set`) and every guard asks for exactly that set
95
+ * (`hasDelimiterLine`), so quoted marker text anywhere in the document stays
96
+ * content.
97
+ */
98
+ export declare function pickSet(content: Iterable<string>): number;
99
+ export declare function pickDelimiters(content: Iterable<string>): ConflictDelimiters;
34
100
  /**
35
101
  * Upper bound on the line-match pairs one diff may process. node-diff3's LCS
36
102
  * walks every (line in A, identical line in B) pair, so a file with many
@@ -71,6 +137,32 @@ export declare function mergeTextThreeWay(input: {
71
137
  remote: Buffer;
72
138
  isText: (content: Buffer) => boolean;
73
139
  }): ThreeWayMergeResult;
140
+ /**
141
+ * True when `text` carries ANY delimiter line of set `set` — its opener,
142
+ * separator or closer, byte-exact (terminator stripped), complete block or
143
+ * not.
144
+ *
145
+ * This is THE predicate behind every decision about a conflicted path: the
146
+ * propose-time refusal (early scan and the encode-time re-check), sync's
147
+ * "markers still unresolved → don't merge again" guard, and dropping the
148
+ * recorded set once the agent has edited the block away. Callers pass the set
149
+ * sync recorded on the manifest entry (`conflict_set`) when it wrote the
150
+ * block, so:
151
+ *
152
+ * - a half-finished hand merge that deleted only the closer still blocks
153
+ * propose — a lone `<<<<<<< mine (parall-merge)` must never land in the
154
+ * wiki (same rule as the Web editor's publish guard, its round 5);
155
+ * - every OTHER set is content: a page that quotes a complete set-1 block
156
+ * verbatim conflicts with set 2 and, once resolved, proposes — only the
157
+ * recorded set is live. The Web draft's `merge_conflict` flag plays the
158
+ * role the manifest's `conflict_set` plays here;
159
+ * - a Setext `=======`, a git-style `<<<<<<< HEAD … >>>>>>> latest` example
160
+ * and the bare `<<<<<<< mine` this CLI used to emit never match: they carry
161
+ * no `(parall-merge…)` tag.
162
+ *
163
+ * Paths without a recorded set are not scanned at all.
164
+ */
165
+ export declare function hasDelimiterLine(text: string, set: number): boolean;
74
166
  export type StalePath = {
75
167
  path: string;
76
168
  /** What the server did to this path since the workspace last synced it. */
@@ -121,13 +213,28 @@ export type StaleRecoveryReport = {
121
213
  };
122
214
  };
123
215
  export declare function isStaleBaseError(err: unknown): err is ApiError;
216
+ /**
217
+ * Agent-facing text for a recovery that stopped on conflicts.
218
+ *
219
+ * There is no resolution recipe any more. `sync` has already moved each
220
+ * conflicted path's baseline to the server's version and left the working tree
221
+ * saying what the agent meant (marker blocks to edit, a kept file, a kept
222
+ * delete), so the only step left is "make the file say what you want, then
223
+ * propose". Every artifact the agent might need is named with its absolute
224
+ * path.
225
+ */
124
226
  export declare function formatStaleRecoveryError(input: {
125
227
  stale: StalePath[];
126
228
  decision: Extract<StaleRecoveryDecision, {
127
229
  kind: 'stop';
128
230
  }>;
129
231
  outcome: WikiSyncOutcome;
130
- /** Absolute marker path for a conflict: the upstream copy, or the remote-deleted marker. */
131
- markerPath: (conflict: SyncConflict) => string;
132
232
  }): string;
233
+ /**
234
+ * Text for the propose-time backstop: files that still carry a marker block.
235
+ * Fail-closed and local — nothing was sent to the server.
236
+ */
237
+ export declare function formatUnresolvedMarkersError(paths: string[]): string;
238
+ /** One line per conflict: what happened, what the working tree now holds, where the artifacts are. */
239
+ export declare function describeConflict(conflict: SyncConflict): string;
133
240
  //# sourceMappingURL=wiki-merge.d.ts.map
@@ -1 +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AgB,gBAAgB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAkC/D"}
@@ -2,13 +2,28 @@
2
2
  * Reconciling a local wiki workspace with a server that moved on:
3
3
  *
4
4
  * - a line-level three-way text merge, used by `wiki sync` when both the
5
- * server and the workspace changed the same file, so non-overlapping
6
- * edits merge instead of parking an upstream copy under conflicts/;
5
+ * server and the workspace changed the same file: non-overlapping edits
6
+ * merge silently, overlapping ones are written into the working file as
7
+ * `<<<<<<< mine (parall-merge)` / `======= (parall-merge)` /
8
+ * `>>>>>>> latest (parall-merge)` blocks — git's shape, the one every
9
+ * agent already knows how to edit, plus a tag so a quoted example of the
10
+ * block in the document is never mistaken for a delimiter;
11
+ * - the propose-time backstop that refuses a file still carrying such a
12
+ * block;
7
13
  * - the stale-base recovery policy `changeset create` follows before it
8
14
  * hands the situation back to the agent.
9
15
  *
10
16
  * Everything here is pure (no filesystem, no network) so the policy is
11
17
  * unit-testable without a mock wiki-service.
18
+ *
19
+ * Format twin: `ts/app/src/lib/wikiThreeWayMerge.ts` (the Web editor's draft
20
+ * merge, landing with PR #2724) is written to generate and recognise the exact
21
+ * same delimiter sets under the same rules. The two packages cannot share code
22
+ * (the CLI does not depend on the app), so each carries its own "format
23
+ * constants" test over one shared fixture; nothing here can enforce the other
24
+ * side. Keep them in lockstep: a human resolving in the browser and an agent
25
+ * resolving in a workspace must see, and be able to hand each other, the same
26
+ * bytes.
12
27
  */
13
28
  import { ApiError } from '@parall/sdk';
14
29
  import { diff3Merge } from 'node-diff3';
@@ -21,6 +36,80 @@ export const STALE_BASE_CODE = 'STALE_BASE';
21
36
  * now — that is a decision for the caller, not a retry loop.
22
37
  */
23
38
  export const MAX_STALE_RECOVERIES = 1;
39
+ /** Marker labels are agent-facing (they land in the working file). */
40
+ export const MERGE_LABEL_MINE = 'mine';
41
+ export const MERGE_LABEL_THEIRS = 'latest';
42
+ const TAG_BASE = 'parall-merge';
43
+ /**
44
+ * Delimiter set `n` (1-based). Set 1 is `<<<<<<< mine (parall-merge)` /
45
+ * `======= (parall-merge)` / `>>>>>>> latest (parall-merge)`; higher sets add
46
+ * `-n` to the tag, MIME-boundary style, and are only used when a document
47
+ * happens to contain set 1 verbatim (say, a wiki page documenting this very
48
+ * feature).
49
+ */
50
+ export function conflictDelimiters(n = 1) {
51
+ const tag = n <= 1 ? `(${TAG_BASE})` : `(${TAG_BASE}-${n})`;
52
+ return {
53
+ open: `<<<<<<< ${MERGE_LABEL_MINE} ${tag}`,
54
+ sep: `======= ${tag}`,
55
+ close: `>>>>>>> ${MERGE_LABEL_THEIRS} ${tag}`,
56
+ };
57
+ }
58
+ /**
59
+ * Highest delimiter set this CLI generates or recognises. The set number is
60
+ * parsed with `Number()`, so an unbounded digit run in content could yield
61
+ * `Infinity` (which JSON-serialises to `null` and would blank the manifest's
62
+ * `conflict_set`) or lose integer precision (so `max + 1` would not move) —
63
+ * either way the guards would stop recognising the block sync itself wrote.
64
+ * Tags with more digits than this are content, and a document that already
65
+ * quotes set {@link MAX_CONFLICT_SET} cannot get an in-file merge at all: the
66
+ * merge reports `delimiter-sets-exhausted` and sync falls back to the
67
+ * `.remote` copy, exactly like binary content.
68
+ */
69
+ export const MAX_CONFLICT_SET = 999_999;
70
+ const SET_DIGITS = String(MAX_CONFLICT_SET).length;
71
+ // Set-number extractors for the three delimiter shapes. A match means "this
72
+ // line is delimiter-shaped, of set n" — whether it is OURS is decided by the
73
+ // recorded set (`hasDelimiterLine`), never by position in the text.
74
+ const TAG_RE_SRC = `\\(${TAG_BASE}(?:-(\\d{1,${SET_DIGITS}}))?\\)$`;
75
+ const OPEN_RE = new RegExp(`^<{7} ${MERGE_LABEL_MINE} ${TAG_RE_SRC}`);
76
+ const SEP_RE = new RegExp(`^={7} ${TAG_RE_SRC}`);
77
+ const CLOSE_RE = new RegExp(`^>{7} ${MERGE_LABEL_THEIRS} ${TAG_RE_SRC}`);
78
+ /** A line without its `\n` / `\r\n` terminator — delimiters are compared this way. */
79
+ function stripEol(line) {
80
+ if (line.endsWith('\r\n'))
81
+ return line.slice(0, -2);
82
+ if (line.endsWith('\n'))
83
+ return line.slice(0, -1);
84
+ if (line.endsWith('\r'))
85
+ return line.slice(0, -1);
86
+ return line;
87
+ }
88
+ function setNumber(line, re) {
89
+ const m = re.exec(line);
90
+ if (!m)
91
+ return 0;
92
+ return m[1] ? Number(m[1]) : 1;
93
+ }
94
+ /**
95
+ * Delimiter set for a document: one past the highest set any content line
96
+ * belongs to (any of the three shapes). Content can therefore only ever carry
97
+ * LOWER sets than the delimiters around it. Sync records the chosen set on the
98
+ * manifest entry (`conflict_set`) and every guard asks for exactly that set
99
+ * (`hasDelimiterLine`), so quoted marker text anywhere in the document stays
100
+ * content.
101
+ */
102
+ export function pickSet(content) {
103
+ let max = 0;
104
+ for (const raw of content) {
105
+ const line = stripEol(raw);
106
+ max = Math.max(max, setNumber(line, OPEN_RE), setNumber(line, SEP_RE), setNumber(line, CLOSE_RE));
107
+ }
108
+ return max + 1;
109
+ }
110
+ export function pickDelimiters(content) {
111
+ return conflictDelimiters(pickSet(content));
112
+ }
24
113
  const LFS_POINTER_PREFIX = 'version https://git-lfs.github.com/spec/';
25
114
  /**
26
115
  * Upper bound on the line-match pairs one diff may process. node-diff3's LCS
@@ -88,6 +177,28 @@ export function mergeTextThreeWay(input) {
88
177
  return { kind: 'not-mergeable', reason: 'too-complex' };
89
178
  }
90
179
  const regions = diff3Merge(localLines, baseLines, remoteLines, { excludeFalseConflicts: true });
180
+ // Marker text is built here, from the structured regions (never from
181
+ // node-diff3's bare-label `merge()` output), with a delimiter set chosen
182
+ // against every line that can appear in the output — so the delimiters are
183
+ // unambiguous by construction: a quoted set-1 block in the document simply
184
+ // pushes this merge to set 2. Same rule as the Web editor's module.
185
+ const set = pickSet([...localLines, ...remoteLines]);
186
+ // A clean merge writes no delimiters, so the cap only matters once there is
187
+ // a block to write: non-overlapping edits around a quoted top-set marker
188
+ // still merge on their own.
189
+ if (set > MAX_CONFLICT_SET && regions.some((region) => region.conflict)) {
190
+ return { kind: 'not-mergeable', reason: 'delimiter-sets-exhausted' };
191
+ }
192
+ const d = conflictDelimiters(set);
193
+ // Marker lines take the document's own line ending so a CRLF file stays
194
+ // CRLF (a mixed-EOL file gets CRLF markers if it contains any CRLF — one
195
+ // style per block, chosen from the local side); a side whose last line has
196
+ // no terminator gets one inside the block (the block is what the agent
197
+ // edits anyway) so the closing marker never glues onto content.
198
+ const eol = /\r\n/.test(input.local.toString('utf8')) ? '\r\n' : '\n';
199
+ const terminated = (lines) => lines.length > 0 && !lines[lines.length - 1].endsWith('\n')
200
+ ? [...lines.slice(0, -1), `${lines[lines.length - 1]}${eol}`]
201
+ : lines;
91
202
  const out = [];
92
203
  let conflictRegions = 0;
93
204
  for (const region of regions) {
@@ -96,11 +207,52 @@ export function mergeTextThreeWay(input) {
96
207
  }
97
208
  else if (region.conflict) {
98
209
  conflictRegions++;
210
+ out.push(`${d.open}${eol}`);
211
+ out.push(...terminated(region.conflict.a));
212
+ out.push(`${d.sep}${eol}`);
213
+ out.push(...terminated(region.conflict.b));
214
+ out.push(`${d.close}${eol}`);
99
215
  }
100
216
  }
101
- if (conflictRegions > 0)
102
- return { kind: 'conflict', conflictRegions };
103
- return { kind: 'clean', merged: Buffer.from(out.join(''), 'utf8') };
217
+ const merged = Buffer.from(out.join(''), 'utf8');
218
+ if (conflictRegions > 0) {
219
+ return { kind: 'conflict', conflictRegions, set, delimiters: d, marked: merged };
220
+ }
221
+ return { kind: 'clean', merged };
222
+ }
223
+ /**
224
+ * True when `text` carries ANY delimiter line of set `set` — its opener,
225
+ * separator or closer, byte-exact (terminator stripped), complete block or
226
+ * not.
227
+ *
228
+ * This is THE predicate behind every decision about a conflicted path: the
229
+ * propose-time refusal (early scan and the encode-time re-check), sync's
230
+ * "markers still unresolved → don't merge again" guard, and dropping the
231
+ * recorded set once the agent has edited the block away. Callers pass the set
232
+ * sync recorded on the manifest entry (`conflict_set`) when it wrote the
233
+ * block, so:
234
+ *
235
+ * - a half-finished hand merge that deleted only the closer still blocks
236
+ * propose — a lone `<<<<<<< mine (parall-merge)` must never land in the
237
+ * wiki (same rule as the Web editor's publish guard, its round 5);
238
+ * - every OTHER set is content: a page that quotes a complete set-1 block
239
+ * verbatim conflicts with set 2 and, once resolved, proposes — only the
240
+ * recorded set is live. The Web draft's `merge_conflict` flag plays the
241
+ * role the manifest's `conflict_set` plays here;
242
+ * - a Setext `=======`, a git-style `<<<<<<< HEAD … >>>>>>> latest` example
243
+ * and the bare `<<<<<<< mine` this CLI used to emit never match: they carry
244
+ * no `(parall-merge…)` tag.
245
+ *
246
+ * Paths without a recorded set are not scanned at all.
247
+ */
248
+ export function hasDelimiterLine(text, set) {
249
+ const d = conflictDelimiters(set);
250
+ for (const raw of text.split('\n')) {
251
+ const line = stripEol(raw);
252
+ if (line === d.open || line === d.sep || line === d.close)
253
+ return true;
254
+ }
255
+ return false;
104
256
  }
105
257
  /**
106
258
  * Split into lines that keep their own terminator (`\n` or `\r\n`), so a
@@ -162,25 +314,18 @@ export function decideStaleRecovery(input) {
162
314
  export function isStaleBaseError(err) {
163
315
  return err instanceof ApiError && err.code === STALE_BASE_CODE;
164
316
  }
317
+ /** Set-1 delimiters, used only to SHOW the block shape in agent-facing text. */
318
+ const DISPLAY = conflictDelimiters(1);
165
319
  /**
166
- * The one resolution sequence that terminates.
320
+ * Agent-facing text for a recovery that stopped on conflicts.
167
321
  *
168
- * `sync` advances a path's baseline only when the working file matches the
169
- * server byte-for-byte (`planSyncActions`: `localSha === remoteSha` →
170
- * fast-forward). So hand-merging both sides into the file and proposing keeps
171
- * the stale baseline: propose sends the old `base_sha`, the server answers
172
- * 409, recovery re-syncs, the path conflicts again — the same error forever.
173
- * Matching the server first is what lets `sync` move the baseline; the local
174
- * edits are then re-applied on top of a current file.
322
+ * There is no resolution recipe any more. `sync` has already moved each
323
+ * conflicted path's baseline to the server's version and left the working tree
324
+ * saying what the agent meant (marker blocks to edit, a kept file, a kept
325
+ * delete), so the only step left is "make the file say what you want, then
326
+ * propose". Every artifact the agent might need is named with its absolute
327
+ * path.
175
328
  */
176
- const RESOLVE_CONFLICT_STEPS = 'Resolve each path in THIS order — matching the server first is what lets `sync` advance your baseline:\n' +
177
- ' 1. Save your version aside: `cp <path> <path>.mine`\n' +
178
- ' 2. Make the working copy match the server: `cp <upstream copy> <path>` ' +
179
- '(for a `.remote-deleted` marker: `rm <path>`)\n' +
180
- ' 3. `parall wiki sync` — your baseline advances only now\n' +
181
- ' 4. Re-apply your changes to the now-current file using `<path>.mine`, then delete it and the marker\n' +
182
- ' 5. Propose again.\n' +
183
- 'Do NOT hand-merge and propose without step 2+3: the baseline stays stale and you get this same error every time.';
184
329
  export function formatStaleRecoveryError(input) {
185
330
  const moved = input.stale.length > 0
186
331
  ? `${input.stale.length} file(s) changed on the server since your last sync:\n` +
@@ -189,20 +334,23 @@ export function formatStaleRecoveryError(input) {
189
334
  switch (input.decision.reason) {
190
335
  case 'conflicts': {
191
336
  const lines = input.outcome.conflicts
192
- .map((c) => ` ${c.path} — ${describeConflict(c)}; ` +
193
- `${c.remoteCopyPath ? 'upstream copy' : 'marker'}: ${input.markerPath(c)}`)
337
+ .map((c) => ` ${c.path} — ${describeConflict(c)}`)
194
338
  .join('\n');
195
- // "Untouched" is only true of the conflicting paths. The same recovery
196
- // can have merged other paths cleanly, rewriting those working copies —
197
- // say so, or the caller re-reads a file it believes it still owns.
339
+ // The same recovery can have merged other paths cleanly, rewriting those
340
+ // working copies — say so, or the caller re-reads a file it believes it
341
+ // still owns.
198
342
  const mergedNote = input.outcome.merged.length > 0
199
343
  ? `Other path(s) merged cleanly and their working copies were rewritten (no action needed): ${input.outcome.merged.join(', ')}.\n`
200
344
  : '';
201
345
  return (`cannot propose: ${moved}\n` +
202
- `Re-synced, but ${input.outcome.conflicts.length} file(s) need your decision — ` +
203
- `your working copy of these paths was not modified:\n${lines}\n` +
346
+ `Re-synced; ${input.outcome.conflicts.length} file(s) need your decision. ` +
347
+ "Your baseline already moved to the server's version, so once each file says what you want, " +
348
+ 'propose again — no further sync needed:\n' +
349
+ `${lines}\n` +
204
350
  mergedNote +
205
- RESOLVE_CONFLICT_STEPS);
351
+ `A file that still contains a \`${DISPLAY.open}\` … \`${DISPLAY.close}\` block ` +
352
+ '(the tag may read `parall-merge-2`, `-3`, … when the page itself quotes the markers) is refused at propose; ' +
353
+ 'delete the three marker lines along with the side you do not want.');
206
354
  }
207
355
  case 'failures': {
208
356
  const lines = input.outcome.failed
@@ -218,8 +366,45 @@ export function formatStaleRecoveryError(input) {
218
366
  'someone else is publishing to the same files right now. Wait a moment, run `parall wiki sync`, then propose again.');
219
367
  }
220
368
  }
221
- function describeConflict(conflict) {
222
- switch (conflict.reason) {
369
+ /**
370
+ * Text for the propose-time backstop: files that still carry a marker block.
371
+ * Fail-closed and local — nothing was sent to the server.
372
+ */
373
+ export function formatUnresolvedMarkersError(paths) {
374
+ return (`cannot propose: ${paths.length} file(s) still contain unresolved conflict markers ` +
375
+ `(\`${DISPLAY.open}\` … \`${DISPLAY.close}\`, tag possibly \`parall-merge-n\`): ${paths.join(', ')}\n` +
376
+ 'Edit each file so it says what you want — keep one side or combine them — delete the three ' +
377
+ 'marker lines, then propose again. Your pre-merge copy is under .parall-wiki/conflicts/<path>.mine. ' +
378
+ 'Nothing was sent to the server.');
379
+ }
380
+ /** One line per conflict: what happened, what the working tree now holds, where the artifacts are. */
381
+ export function describeConflict(conflict) {
382
+ switch (conflict.resolution) {
383
+ case 'in-file-markers': {
384
+ const n = conflict.conflictRegions ?? 0;
385
+ return (`${describeReason(conflict.reason)}; ${n} overlapping block(s) are marked in the file ` +
386
+ `(\`${DISPLAY.open}\` … \`${DISPLAY.close}\`) with the non-overlapping changes already merged around them` +
387
+ (conflict.mineCopyPath ? `; your pre-merge copy: ${conflict.mineCopyPath}` : ''));
388
+ }
389
+ case 'upstream-copy':
390
+ return (`${describeReason(conflict.reason)}; not merged in place (${describeNotMergeable(conflict.notMergeableReason)}) ` +
391
+ `— your file is untouched; the server's version is at ${conflict.remoteCopyPath ?? '<missing>'}. ` +
392
+ 'Edit your file to include what you want from it, then propose.');
393
+ case 'local-delete-kept':
394
+ return (`${describeReason(conflict.reason)}; your delete stands and will be proposed as-is. ` +
395
+ `The server's newer version is at ${conflict.remoteCopyPath ?? '<missing>'} — copy it back to the workspace path instead if you want to keep the file.`);
396
+ case 'local-file-kept':
397
+ if (conflict.notMergeableReason === 'unresolved-markers') {
398
+ return (`${describeReason(conflict.reason)}; your file is kept, but it still has unresolved conflict markers from an earlier sync — ` +
399
+ 'edit those away first, then propose: it re-syncs this path and reports the file as kept; ' +
400
+ 'propose once more to recreate it, or delete the file to accept the removal.');
401
+ }
402
+ return (`${describeReason(conflict.reason)}; your file is kept and will be proposed as a new file. ` +
403
+ 'Delete it to accept the removal instead.');
404
+ }
405
+ }
406
+ function describeReason(reason) {
407
+ switch (reason) {
223
408
  case 'remote-changed-local-edited':
224
409
  return 'both you and the server changed it and the changes overlap';
225
410
  case 'remote-deleted-local-edited':
@@ -230,3 +415,23 @@ function describeConflict(conflict) {
230
415
  return 'the server changed it and you deleted it';
231
416
  }
232
417
  }
418
+ function describeNotMergeable(reason) {
419
+ switch (reason) {
420
+ case 'binary':
421
+ return 'binary content';
422
+ case 'lfs-pointer':
423
+ return 'Git LFS pointer';
424
+ case 'too-complex':
425
+ return 'file too long or too repetitive to merge within the time budget';
426
+ case 'delimiter-sets-exhausted':
427
+ return `the file already quotes the highest conflict-marker set this CLI can tag (parall-merge-${MAX_CONFLICT_SET}), so the conflict could not be written into it`;
428
+ case 'unresolved-markers':
429
+ return 'your file still has unresolved conflict markers from an earlier sync — resolve those first';
430
+ case 'no-baseline':
431
+ return 'no local copy of the previous baseline';
432
+ case 'moved-since-snapshot':
433
+ return 'the file changed while sync was running';
434
+ default:
435
+ return 'not mergeable';
436
+ }
437
+ }
@@ -0,0 +1,43 @@
1
+ import { type WikiChangeset, type WikiDiffFile } from '@parall/sdk';
2
+ import { type StaleRecoveryReport } from './wiki-merge.js';
3
+ import { type ParallContext, type WikiSyncOutcome } from './wiki-shared.js';
4
+ export type WikiProposeOptions = {
5
+ changesetId?: string;
6
+ title: string;
7
+ message?: string;
8
+ sourceChatId?: string;
9
+ sourceMessageId?: string;
10
+ sourceRunId?: string;
11
+ };
12
+ export type WikiProposeResult = {
13
+ wiki_id: string;
14
+ wiki_slug: string;
15
+ wiki_name: string;
16
+ mount_path: string;
17
+ changed_paths: string[];
18
+ diff_files: WikiDiffFile[];
19
+ changeset: WikiChangeset;
20
+ status: WikiChangeset['status'];
21
+ auto_merged: boolean;
22
+ requires_review: boolean;
23
+ next_action: string;
24
+ post_merge_sync: WikiSyncOutcome | null;
25
+ post_merge_sync_error: string | null;
26
+ /** Set when the server had moved since the last sync and propose re-synced and retried on its own. */
27
+ stale_recovery: StaleRecoveryReport | null;
28
+ source: 'local_mount';
29
+ };
30
+ export declare function proposeWikiChangeset(ctx: ParallContext, wikiRef: string | undefined, options: WikiProposeOptions): Promise<WikiProposeResult>;
31
+ /**
32
+ * Discard all local changes and restore files to the last synced state.
33
+ * Restores from the local baseline object store (network only as a
34
+ * SHA-verified fallback for pre-objects mounts), so the workspace lands
35
+ * exactly on the manifest baseline — `wiki status` reports clean afterwards.
36
+ */
37
+ export declare function resetWikiWorkspace(ctx: ParallContext, wikiRef?: string): Promise<{
38
+ wiki_id: string;
39
+ wiki_slug: string;
40
+ files_restored: number;
41
+ unrestorable_paths: string[];
42
+ }>;
43
+ //# sourceMappingURL=wiki-propose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wiki-propose.d.ts","sourceRoot":"","sources":["../../src/lib/wiki-propose.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAA4B,MAAM,aAAa,CAAC;AAC9F,OAAO,EAEL,KAAK,mBAAmB,EAOzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,KAAK,aAAa,EAIlB,KAAK,eAAe,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