Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 91 to 318

Compare

+176 −44 in 27 places
Lines 2–9 at 318 (were 2–8 at 91)
22
33import { existsSync, readFileSync } from "node:fs";
44import { join } from "node:path";
5−import { type Api, ApiError, type Collision, type Settled } from "./api.ts";
5+import { autoTrailer } from "../../worker/project/autosettle.ts";
6+import { type Advice, type Api, ApiError, type Collision, type Settled } from "./api.ts";
67import { bool, type Parsed, str, UsageError } from "./args.ts";
78import { boxOf, knownPrep, runRun, shellWord } from "./box-commands.ts";
89import { collisionsHeading, collisionText, mergedLinesText, mergedText } from "./collision-text.ts";
Lines 13–19 at 318 (were 12–17 at 91)
1213 FOLDER_LOG_LIMIT,
1314 LISTED,
1415 meantBinary,
16+ pullUnfinished,
1517 READER_REFUSES,
1618 recordedFirst,
1719 recordFolder,
Lines 66–85 at 318 (were 64–69 at 91)
6466 ];
6567}
6668
69+/**
70+ * After "Pushed version N.": whether CI will check it, where the server says (its `ciWhere`). Nothing for the server's own
71+ * compute, where pushes have always been checked, or for a server that doesn't say.
72+ */
73+export function ciWhereText(where: string | undefined, version: number): string[] {
74+ if (where === "off")
75+ return [
76+ `CI is off for this project, so version ${version} isn't checked. Connect a Cloudflare account in the project's settings on the website to run it there.`,
77+ ];
78+ if (where === "account")
79+ return [`CI checks it in the project's Cloudflare account: abso ci ${version} shows the result.`];
80+ return [];
81+}
6783export async function runPublish(args: Parsed, env: Env): Promise<Output> {
6884 const message = str(args, "message");
6985 if (!message) throw new UsageError('say why with -m "<message>"');
Lines 89–95 at 318 (were 73–79 at 91)
7389 const rawWait = str(args, "wait");
7490 if (rawWait !== undefined && !/^\d{1,4}$/.test(rawWait))
7591 throw new UsageError(
76− `--wait is how many seconds to wait for a queued publish to land, like 100 (got ${JSON.stringify(rawWait)})`,
92+ `--wait is how many seconds to wait for a queued push to land, like 100 (got ${JSON.stringify(rawWait)})`,
7793 );
7894 const waitSeconds = bool(args, "no-wait") ? 0 : rawWait === undefined ? WAIT_SECONDS : Number(rawWait);
7995 let skippedCheck = false;
Lines 121–143 at 318 (were 105–127 at 91)
105121 const say = env.writeErr ?? env.write;
106122 // Known to have no prep: refuse before syncing and running (#37). Unknown: the run below tells.
107123 const noPrep =
108− "your box has no prep, so a check would run without node_modules and its result couldn't be trusted. Run abso prep 'npm ci --ignore-scripts' once (every fresh box then starts from it), then publish --check again.";
124+ "your box has no prep, so a check would run without node_modules and its result couldn't be trusted. Run abso prep 'npm ci --ignore-scripts' once (every fresh box then starts from it), then push --check again.";
109125 if (knownPrep(root, boxOf(args, env)) === null && existsSync(join(root, "package-lock.json"))) {
110126 return {
111127 exit: EXIT.refused,
112− text: `Not published: ${noPrep} (Nothing was run: this folder's last run in that box said it had no prep.)`,
128+ text: `Not pushed: ${noPrep} (Nothing was run: this folder's last run in that box said it had no prep.)`,
113129 json: { check: { command: check, ran: false, prep: null } },
114130 };
115131 }
116132 const synced = await unreached(
117133 runSync({ positionals: [], flags: new Map() }, env),
118− "Nothing was published, and the check didn't run.",
134+ "Nothing was pushed, and the check didn't run.",
119135 );
120136 const sj = synced.json as { collisions?: readonly unknown[]; refused?: readonly Refused[] };
121137 if ((sj.collisions?.length ?? 0) > 0) {
122138 return {
123139 exit: EXIT.refused,
124− text: `${synced.text}\nNot published: the sync before the check left collisions. Settle them, then publish --check again.`,
140+ text: `${synced.text}\nNot pushed: the pull before the check left collisions. Settle them, then push --check again.`,
125141 json: { check: null, sync: synced.json },
126142 };
127143 }
Lines 145–151 at 318 (were 129–135 at 91)
129145 // Paths the sync wouldn't write (safety.ts) don't block: the check just ran without them.
130146 if ((sj.refused?.length ?? 0) > 0)
131147 say(
132− `abso: the sync didn't write these: ${sj.refused!.map((r) => r.path).join(", ")}; the check runs without them.\n`,
148+ `abso: the pull didn't write these: ${sj.refused!.map((r) => r.path).join(", ")}; the check runs without them.\n`,
133149 );
134150 say(`abso: checking your draft on newest shared in the box: ${check}\n`);
135151 const flags = new Map<string, string | boolean>();
Lines 157–163 at 318 (were 141–147 at 91)
141157 if ((ran.json as { prep?: string | null }).prep === null && existsSync(join(root, "package-lock.json"))) {
142158 return {
143159 exit: EXIT.refused,
144− text: "Not published: your box has no prep, so the check ran without node_modules and its result can't be trusted. Run abso prep 'npm ci --ignore-scripts' once (every fresh box then starts from it), then publish --check again.",
160+ text: "Not pushed: your box has no prep, so the check ran without node_modules and its result can't be trusted. Run abso prep 'npm ci --ignore-scripts' once (every fresh box then starts from it), then push --check again.",
145161 json: { check: { command: check, exit: ran.exit ?? 0, prep: null } },
146162 };
147163 }
Lines 191–197 at 318 (were 175–181 at 91)
175191 return {
176192 exit: EXIT.refused,
177193 text: [
178− `Not published: the check failed (exit ${ran.exit}) on your draft with newest shared. Its output is above.`,
194+ `Not pushed: the check failed (exit ${ran.exit}) on your draft with newest shared. Its output is above.`,
179195 ...verdict,
180196 ].join("\n"),
181197 json: {
Lines 203–209 at 318 (were 187–193 at 91)
187203 },
188204 };
189205 }
190− say("abso: the check passed; publishing.\n");
206+ say("abso: the check passed; pushing.\n");
191207 }
192208 const checked = check !== undefined;
193209 const leftOut: LeftOut[] = [];
Lines 211–218 at 318 (were 195–204 at 91)
195211 // Say how far it got when the server can't be reached (#37, GAME - UI/UX: did the check run? did the draft go up?).
196212 const reached = await unreached(
197213 steps,
198− checked
199− ? "The check passed, but the publish never reached the server: nothing was published."
200− : "Nothing was published.",
201− `${checked ? "The check passed; " : ""}the publish may have reached the server before its answer was lost: abso status shows whether your draft was published.`,
214+ checked ? "The check passed, but the push never reached the server: nothing was pushed." : "Nothing was pushed.",
215+ `${checked ? "The check passed; " : ""}the push may have reached the server before its answer was lost: abso status shows whether your draft was pushed.`,
202216 );
203217 const out = withLeftOut(reached, leftOut);
204218 // --done: this publish finishes the work the start note named (#44): take the note back once it's published.
Lines 223–229 at 318 (were 209–215 at 91)
209223 if (queued === undefined || outcome === "pulled") return out;
210224 return {
211225 ...out,
212− text: `${out.text}\nYour start note stays (--done): publish ${queued} hasn't landed yet. Once it has, abso start --done takes the note back and abso issue <N> --done closes the issue it names.`,
226+ text: `${out.text}\nYour start note stays (--done): push ${queued} hasn't landed yet. Once it has, abso start --done takes the note back and abso issue <N> --done closes the issue it names.`,
213227 };
214228 }
215229 // done (#54): the work is finished, so an issue the note named is closed with this change.
Lines 258–264 at 318 (were 244–250 at 91)
244258 );
245259 if (landed) {
246260 return {
247− text: `Published version ${landed.version}. The server's answer was lost (${why}), but shared's log shows your publish landed.`,
261+ text: `Pushed version ${landed.version}. The server's answer was lost (${why}), but shared's log shows your push landed.`,
248262 json: { version: landed.version, lostAnswer: why },
249263 };
250264 }
Lines 268–280 at 318 (were 254–266 at 91)
254268 if (queued) {
255269 return {
256270 exit: STILL_QUEUED,
257− text: `Queued as publish ${queued.id}. The server's answer was lost (${why}), but the merge queue holds your publish; the outcome comes as news on your next edit, and abso status shows the queue.`,
271+ text: `Queued as push ${queued.id}. The server's answer was lost (${why}), but the merge queue holds your push; the outcome comes as news on your next edit, and abso status shows the queue.`,
258272 json: { queued: queued.id, outcome: "queued", lostAnswer: why },
259273 };
260274 }
261275 return {
262276 exit: EXIT.error,
263− text: `Not published: ${why}. Shared's newest versions and the merge queue don't have it, so it's safe to publish again.`,
277+ text: `Not pushed: ${why}. Shared's newest versions and the merge queue don't have it, so it's safe to push again.`,
264278 json: { published: false, lostAnswer: why },
265279 };
266280 } catch {
Lines 309–315 at 318 (were 295–300 at 91)
295309 waitSeconds: number,
296310 skippedCheck: boolean,
297311 leftOut: LeftOut[],
312+ autoSettled = false,
298313): Promise<Output> {
299314 const recorded = await recordFolder(root, api, false, meantBinary(args));
300315 leftOut.push(...recorded.leftOut);
Lines 318–324 at 318 (were 303–309 at 91)
303318 // Publishing now would leave the others on the file's old text without anyone noticing (#25).
304319 return {
305320 exit: EXIT.refused,
306− text: [...pre, ...turnedBinaryText(recorded.turnedBinary), "Not published."].join("\n"),
321+ text: [...pre, ...turnedBinaryText(recorded.turnedBinary), "Not pushed."].join("\n"),
307322 json: { turnedBinary: recorded.turnedBinary, recorded: recorded.sent },
308323 };
309324 }
Lines 346–352 at 318 (were 331–337 at 91)
331346 if (answer.ok && "queued" in answer) {
332347 // The merge queue (#39): it lands once a batch with it passes the project's check.
333348 const say = env.writeErr ?? env.write;
334− const head = `Queued as publish ${answer.queued}${answer.ahead === 0 ? "" : `, ${answer.ahead} ${answer.ahead === 1 ? "publish" : "publishes"} ahead of it`}: it lands once the project's check passes on it in the merge queue.`;
349+ const head = `Queued as push ${answer.queued}${answer.ahead === 0 ? "" : `, ${answer.ahead} ${answer.ahead === 1 ? "push" : "pushes"} ahead of it`}: it lands once the project's check passes on it in the merge queue.`;
335350 const notes = [
336351 ...pre,
337352 ...(skippedCheck
Lines 380–386 at 318 (were 365–373 at 91)
365380 if (out.kind !== "waiting") heard(root, out.news);
366381 if (out.kind === "landed")
367382 return {
368− text: [...notes, `Published version ${out.version}: it passed the project's check in the merge queue.`].join(
369− "\n",
370− ),
383+ text: [...notes, `Pushed version ${out.version}: it passed the project's check in the merge queue.`].join("\n"),
371384 json: { ...json, version: out.version, outcome: "landed" },
372385 };
373386 if (out.kind === "pulled")
Lines 394–400 at 318 (were 381–387 at 91)
381394 exit: STILL_QUEUED,
382395 text: [
383396 ...notes,
384− `Publish ${answer.queued} left the merge queue, but nothing said whether it landed: abso log -n 3 shows it if it did.`,
397+ `Push ${answer.queued} left the merge queue, but nothing said whether it landed: abso log -n 3 shows it if it did.`,
385398 ].join("\n"),
386399 json: { ...json, outcome: "unknown" },
387400 };
Lines 404–410 at 318 (were 391–399 at 91)
391404 : "still in the queue (the queue could not be read)";
392405 return {
393406 exit: STILL_QUEUED,
394− text: [...notes, `Still queued after ${waitSeconds} s: publish ${answer.queued} is ${where}. ${later}`].join(
395− "\n",
396− ),
407+ text: [...notes, `Still queued after ${waitSeconds} s: push ${answer.queued} is ${where}. ${later}`].join("\n"),
397408 json: { ...json, outcome: "queued" },
398409 };
399410 }
Lines 413–419 at 318 (were 402–408 at 91)
402413 const what =
403414 answer.changes === 0
404415 ? await alreadyInShared(root, api, config.agent, recorded.paths, answer.version)
405− : `Published version ${answer.version}.${merged.length > 0 ? ` ${mergedText(merged)}` : ""}`;
416+ : `Pushed version ${answer.version}.${merged.length > 0 ? ` ${mergedText(merged)}` : ""}`;
406417 // The check ran on shared as it was; what landed since went in unchecked.
407418 const moved =
408419 checked && merged.length > 0
Lines 433–443 at 318 (were 422–430 at 91)
422433 ]
423434 : []),
424435 ...settledText(answer.settled ?? [], answer.version),
436+ ...(answer.changes === 0 ? [] : ciWhereText(answer.ciWhere, answer.version)),
425437 ].join("\n"),
426438 json: {
427439 version: answer.version,
440+ ...(answer.ciWhere === undefined ? {} : { ciWhere: answer.ciWhere }),
428441 changes: answer.changes ?? null,
429442 mergedWith: answer.mergedWith ?? [],
430443 settled: answer.settled ?? [],
Lines 453–461 at 318 (were 440–448 at 91)
440453 exit: EXIT.refused,
441454 text: [
442455 ...pre,
443− `Not published: ${files.join(", ")} still ${files.length === 1 ? "has" : "have"} collision markers (${plural(collisions.length, "block")}).`,
456+ `Not pushed: ${files.join(", ")} still ${files.length === 1 ? "has" : "have"} collision markers (${plural(collisions.length, "block")}).`,
444457 ...collisions.map(collisionText),
445− `Settle each: keep yours, theirs or a mix and delete the marker lines, or abso settle <file> --yours|--theirs|--both. Then publish again. abso publish --as-is keeps both sides everywhere; the other authors hear it.`,
458+ `Settle each: keep yours, theirs or a mix and delete the marker lines, or abso settle <file> --yours|--theirs|--both. Then push again. abso push --as-is keeps both sides everywhere; the other authors hear it.`,
446459 ].join("\n"),
447460 json: { collisions, recorded: recorded.sent },
448461 };
Lines 466–474 at 318 (were 453–461 at 91)
453466 exit: EXIT.refused,
454467 text: [
455468 ...pre,
456− `Not published: ${plural(collisions.length, "collision")} you synced into and haven't edited since. Both sides' lines are still in the file, so publishing now would put them in shared twice.`,
469+ `Not pushed: ${plural(collisions.length, "collision")} you pulled into and haven't edited since. Both sides' lines are still in the file, so pushing now would put them in shared twice.`,
457470 ...collisions.map(collisionText),
458− "Edit each to what it should be (keep yours, theirs, or a mix), then publish again. If both really belong, abso publish --as-is keeps both.",
471+ "Edit each to what it should be (keep yours, theirs, or a mix), then push again. If both really belong, abso push --as-is keeps both.",
459472 ].join("\n"),
460473 json: { collisions, recorded: recorded.sent },
461474 };
Lines 477–629 at 318 (were 464–500 at 91)
464477 const real = collisions.filter((c) => !isLocalOnly(c.file));
465478 const twice = real.filter((c) => c.kind === "duplicate");
466479 const newer = real.filter((c) => c.kind !== "duplicate");
480+ // The server's first opinion on each collision (#19), when it runs AUTOSETTLE.
481+ const advice = answer.advice ?? [];
482+ // When the server says to settle (its AUTOSETTLE=act) and to keep a side of every collision, settle them here and
483+ // push again (ABSO_AUTOSETTLE=off stops it).
484+ const plan = autoSettled || answer.settle !== true ? null : autoPlan(collisions, advice, env);
485+ if (plan) {
486+ const pulled = await runSync({ positionals: [], flags: new Map() }, env);
487+ const done: string[] = [];
488+ for (const [file, a] of plan) {
489+ const path = absolute(root, file);
490+ const text = readText(path);
491+ const settled =
492+ text === null || text === undefined ? null : settleText(text, a.pick as "yours" | "theirs" | "both");
493+ if (!settled) continue;
494+ if (settled.blocks > 0) {
495+ writeFileAtomic(path, settled.text);
496+ done.push(file);
497+ continue;
498+ }
499+ // No marker block: the pull merged the lines itself. That counts when the file already holds the
500+ // advised side's lines (keep both: both sides').
501+ const lines = new Set(text!.split(/\r?\n/).map((l) => l.trim()));
502+ const sides = collisions
503+ .filter((c) => c.file === file)
504+ .flatMap((c) => [
505+ ...(a.pick !== "theirs" ? [c.yours.text] : []),
506+ ...(a.pick !== "yours" ? [c.theirs.text] : []),
507+ ]);
508+ const wanted = sides.flatMap((t) => t.split(/\r?\n/).map((l) => l.trim())).filter((l) => l !== "");
509+ if (wanted.length > 0 && wanted.every((l) => lines.has(l))) done.push(file);
510+ }
511+ const left = [...plan.keys()].filter((f) => !done.includes(f));
512+ if (left.length > 0)
513+ return {
514+ exit: EXIT.refused,
515+ text: [
516+ ...pre,
517+ pulled.text,
518+ `Not pushed: the server advised settling ${left.join(", ")}, but the pull left no marker block there. Settle as the pull says, then push again.`,
519+ ].join("\n"),
520+ json: { collisions, advice, autosettle: { pulled: true, settled: done, left } },
521+ };
522+ const again = await publishSteps(
523+ args,
524+ env,
525+ root,
526+ config,
527+ api,
528+ `${message}\n\n${autoTrailer(plan)}`,
529+ checked,
530+ waitSeconds,
531+ skippedCheck,
532+ leftOut,
533+ true,
534+ );
535+ return {
536+ ...again,
537+ text: [
538+ ...pre,
539+ `Held: ${plural(collisions.length, "collision")} with work pushed since your last pull. Settled automatically, as the server advised:`,
540+ ...[...plan].map(([file, a]) => ` ${file}: ${adviceWords(a)}`),
541+ again.text,
542+ "Check what was kept with abso show <version>:<file>; to change it, edit the file and push. ABSO_AUTOSETTLE=off settles nothing by itself.",
543+ ].join("\n"),
544+ json: { ...(again.json as object), autosettled: Object.fromEntries(plan) },
545+ };
546+ }
467547 return {
468548 exit: EXIT.refused,
469549 text: [
470550 ...pre,
471551 // A name defined twice is already in your folder (sync listed it); the rest is newer work.
472− `Not published: ${plural(collisions.length, "collision")}${newer.length > 0 ? " with work published since your last sync" : ""}.${answer.reason ? ` (${answer.reason})` : ""}`,
552+ `Not pushed: ${plural(collisions.length, "collision")}${newer.length > 0 ? " with work pushed since your last pull" : ""}.${answer.reason ? ` (${answer.reason})` : ""}`,
473553 ...real.map(collisionText),
554+ ...(advice.some((a) => a)
555+ ? [
556+ "First opinion (a model on the server, with checks in code; you still settle):",
557+ ...collisions.flatMap((c, i) => (advice[i] ? [` ${c.file}: ${adviceWords(advice[i]!)}`] : [])),
558+ ]
559+ : []),
474560 ...(local.length > 0
475561 ? [
476− ` ${local.map((c) => c.file).join(", ")}: local files that should never have been shared. abso sync drops them from your draft and leaves your copy on disk.`,
562+ ` ${local.map((c) => c.file).join(", ")}: local files that should never have been shared. abso pull drops them from your draft and leaves your copy on disk.`,
477563 ]
478564 : []),
479565 ...(real.some((c) => c.theirs.queued !== undefined)
480566 ? [
481− "Some of theirs are still in the merge queue, not in shared: once they land (abso status shows the queue), abso sync brings them in to settle; if they're pulled, publish again as you are.",
567+ "Some of theirs are still in the merge queue, not in shared: once they land (abso status shows the queue), abso pull brings them in to settle; if they're turned back, push again as you are.",
482568 ]
483569 : []),
484570 newer.length > 0
485− ? `Run abso sync: each of those files comes back holding both sides' lines, with no markers. Edit it to what it should be${twice.length > 0 ? ", keep one definition of each name defined twice" : ""}, then publish again.`
571+ ? `Run abso pull: each of those files comes back holding both sides' lines, in a marker block where you both changed the same lines. Settle each as the pull says${twice.length > 0 ? ", keep one definition of each name defined twice" : ""}, then push again.`
486572 : twice.length > 0
487− ? "Keep one definition of each name defined twice (delete yours, or theirs), then publish again."
488− : "Run abso sync, then publish again.",
573+ ? "Keep one definition of each name defined twice (delete yours, or theirs), then push again."
574+ : "Run abso pull, then push again.",
489575 ].join("\n"),
490− json: { collisions, recorded: recorded.sent, ...(answer.reason ? { reason: answer.reason } : {}) },
576+ json: {
577+ collisions,
578+ recorded: recorded.sent,
579+ ...(answer.reason ? { reason: answer.reason } : {}),
580+ ...(advice.length > 0 ? { advice } : {}),
581+ },
491582 };
492583}
493584
585+function adviceWords(a: Advice): string {
586+ const what = a.pick === "agent" ? "needs an agent" : `keep ${a.pick}`;
587+ const how =
588+ a.by === "rule"
589+ ? "by a check in code"
590+ : a.by === "turned down"
591+ ? `the model said keep ${a.modelPick}, turned down`
592+ : a.by === "unsure"
593+ ? `the model leaned to keep ${a.modelPick} at ${a.confidence.toFixed(2)}`
594+ : `confidence ${a.confidence.toFixed(2)}`;
595+ return `${what} (${how}): ${a.reason}`;
596+}
598+/**
599+ * What to settle by itself (#19), file by file, or null to leave it to the agent: every collision a lines collision
600+ * the server advised keeping a side of (it advises a side only at or above its threshold), each file's advice the
601+ * same, nothing still queued or local-only, and ABSO_AUTOSETTLE not "off".
602+ */
603+function autoPlan(
604+ collisions: readonly Collision[],
605+ advice: readonly (Advice | null)[],
606+ env: Env,
607+): Map<string, Advice> | null {
608+ if (fromEnv(env.env, "AUTOSETTLE") === "off" || collisions.length === 0) return null;
609+ const plan = new Map<string, Advice>();
610+ for (const [i, c] of collisions.entries()) {
611+ const a = advice[i];
612+ if ((c.kind ?? "lines") !== "lines" || c.untouched || c.marked || c.theirs.queued !== undefined) return null;
613+ if (isLocalOnly(c.file) || !a || a.pick === "agent") return null;
614+ const before = plan.get(c.file);
615+ if (before && before.pick !== a.pick) return null;
616+ if (!before || a.confidence < before.confidence) plan.set(c.file, a);
617+ }
618+ return plan;
619+}
494621export async function runSync(args: Parsed, env: Env): Promise<Output> {
495622 const { root, api } = open(env);
496623 const recorded = await recordFolder(root, api);
497624 const ignoredDropped = await dropIgnoredFromDraft(root, api);
625+ // A pull here that never wrote its answer (abso-core 26): this one asks for every file to catch up.
626+ const catchingUp = pullUnfinished(root) && !bool(args, "full");
498627 const s = await syncFolder(root, api, bool(args, "full"));
499628 const changes = s.written.length + s.deleted.length;
500629 // A renamed file is one line, not an update and a delete.
Lines 633–649 at 318 (were 504–517 at 91)
504633 ...turnedBinaryText(recorded.turnedBinary),
505634 ...recordedFirst(recorded),
506635 ...droppedIgnoredText(ignoredDropped),
507− `Synced to version ${s.version}: ${changes === 0 ? "no files changed" : `${plural(updated.length, "file")} updated, ${removed.length} deleted${s.renamed.length > 0 ? `, ${s.renamed.length} renamed` : ""}`}.`,
508− ...changedFilesText("sync", updated, removed, s.renamed, bool(args, "verbose")),
636+ `Pulled to version ${s.version}: ${changes === 0 ? "no files changed" : `${plural(updated.length, "file")} updated, ${removed.length} deleted${s.renamed.length > 0 ? `, ${s.renamed.length} renamed` : ""}`}.`,
637+ ...changedFilesText("pull", updated, removed, s.renamed, bool(args, "verbose")),
638+ ...(catchingUp
639+ ? ["The last pull here didn't finish, so this one asked for every file and wrote the ones that differed."]
640+ : []),
509641 ...refusedText(s.refused),
510642 // Ones an earlier sync couldn't write; this sync's are named just above.
511643 ...unwrittenText(s.unwritten, new Set(s.refused.map((r) => r.path))),
512644 ...mergedLinesText(s.merged),
513645 ...(s.kept.length > 0
514− ? [`Left alone because they changed while syncing (run abso sync again): ${s.kept.join(", ")}`]
646+ ? [`Left alone because they changed while pulling (run abso pull again): ${s.kept.join(", ")}`]
515647 : []),
516648 ...(s.dropped.length > 0
517649 ? [`Dropped from your draft, kept on disk (these stay local): ${s.dropped.join(", ")}`]
Lines 701–707 at 318 (were 569–575 at 91)
569701 recordedPaths: readonly string[],
570702 version: number,
571703): Promise<string> {
572− const empty = `Nothing to publish: your draft is empty. Shared is at version ${version}.`;
704+ const empty = `Nothing to push: your draft is empty. Shared is at version ${version}.`;
573705 const log = await api.log({ agent }, FOLDER_LOG_LIMIT);
574706 const since = log.versions.find((v) => v.agent === agent)?.time ?? 0;
575707 const edited = new Set(recordedPaths);
Lines 720–726 at 318 (were 588–594 at 91)
588720 found.push(`${rel} (version ${last.version}, ${last.agent}: "${last.message}")`);
589721 }
590722 if (found.length === 0) return empty;
591− return `Nothing published: shared already has ${found.length === 1 ? "the file you changed" : "the files you changed"} as you have ${found.length === 1 ? "it" : "them"}, so nothing of yours is lost. Last changed in ${found.join("; ")}. Shared is at version ${version}.`;
723+ return `Nothing pushed: shared already has ${found.length === 1 ? "the file you changed" : "the files you changed"} as you have ${found.length === 1 ? "it" : "them"}, so nothing of yours is lost. Last changed in ${found.join("; ")}. Shared is at version ${version}.`;
592724}
593725
594726/**
MCP
compare on this site's /mcp
CLI
abso diff 91 318 client/src/publish-commands.ts --json
JSON
/christopher/abso-core/compare/91..318?file=client%2Fsrc%2Fpublish-commands.ts&format=json