prreviewbuddy 0.25.6 → 0.25.7

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.25.7
4
+
5
+ **The agent you chose is the agent that runs.** Setting a default agent, with
6
+ `prreviewbuddy config set agent codex` or by picking one when asked, made the terminal say
7
+ `Using Codex.` and then start the review under Claude anyway. Only `--agent` typed on the command
8
+ line reached the job; every other way of arriving at an agent, including the configured default and
9
+ the first-run picker, was worked out, announced and then dropped, and the review fell back to
10
+ Claude because that is what a job with no agent recorded means.
11
+
12
+ Nothing about it was visible unless it failed. A signed-in Claude simply reviewed the change, well,
13
+ under a tool nobody had asked for; the way it surfaced was a sign-in message naming Claude on a
14
+ machine where Codex was the default.
15
+
16
+ **Resuming a paused review answers `--agent` instead of ignoring it.** A resume continues under the
17
+ agent the review was started by, because the phases it has already finished were done by that one
18
+ and switching halfway would leave a review whose provenance and whose execution disagree. That is
19
+ unchanged; what is new is that it says so, and names `--reanalyse --agent` as the way to analyse
20
+ the same commit with another agent. It stays quiet when the flag asks for the agent already
21
+ running.
22
+
3
23
  ## 0.25.6
4
24
 
5
25
  **A review you open while it is still running now looks like one that is running.** Following the
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { B as BUILD_VERSION, Bt as STORE_ROOT, C as statedWorkspacePort, E as updateReview, F as startJob, Ft as agentIdOf, G as forgeResolver, Ht as agentById, J as clearClaim, L as record, Lt as readAgentPreference, Mt as resolveTarget, N as reanalyseReview, Nt as displayRef, P as runJob, Pt as git, Q as removeWorktree, R as recordTelemetryUploadConsent, Rt as writeAgentPreference, St as summarise, V as PACKAGE_NAME, Vt as AGENT_IDS, Wt as detectAgents, X as MANAGED_ROOT, Y as isClaimed, Z as readMarker, a as liveJobsFor, b as MIN_WORKSPACE_PORT, bt as reviewedRepositories, ct as followedRefName, dt as lineageKeyFor, et as checkFreshness, f as ensureServer, g as workspaceUrl, h as stopServer, ht as positionInLineage, it as loadJob, j as recordKissRun, l as readIndexToken, lt as groupByLineage, m as reviewsUrl, mt as matchingWorkspaceIds, o as wasBlocked, pt as loadWorkspace, r as deleteReview$1, rt as isTerminal, s as runningJobs, st as progressSteps, t as relativeTime, tt as allJobs, u as bootstrapUrl, v as DEFAULT_WORKSPACE_PORT, vt as recentWorkspaces, w as writePortPreference, x as parseWorkspacePort, xt as saveWorkspace, y as MAX_WORKSPACE_PORT, z as telemetryUploadConsent, zt as CONFIG_PATH } from "./relative_time-DJ9iHDDG.js";
2
+ import { B as BUILD_VERSION, Bt as STORE_ROOT, C as statedWorkspacePort, E as updateReview, F as startJob, Ft as agentIdOf, G as forgeResolver, Gt as detectAgents, Ht as DEFAULT_AGENT_ID, J as clearClaim, L as record, Lt as readAgentPreference, Mt as resolveTarget, N as reanalyseReview, Nt as displayRef, P as runJob, Pt as git, Q as removeWorktree, R as recordTelemetryUploadConsent, Rt as writeAgentPreference, St as summarise, Ut as agentById, V as PACKAGE_NAME, Vt as AGENT_IDS, X as MANAGED_ROOT, Y as isClaimed, Z as readMarker, a as liveJobsFor, b as MIN_WORKSPACE_PORT, bt as reviewedRepositories, ct as followedRefName, dt as lineageKeyFor, et as checkFreshness, f as ensureServer, g as workspaceUrl, h as stopServer, ht as positionInLineage, it as loadJob, j as recordKissRun, l as readIndexToken, lt as groupByLineage, m as reviewsUrl, mt as matchingWorkspaceIds, o as wasBlocked, pt as loadWorkspace, r as deleteReview$1, rt as isTerminal, s as runningJobs, st as progressSteps, t as relativeTime, tt as allJobs, u as bootstrapUrl, v as DEFAULT_WORKSPACE_PORT, vt as recentWorkspaces, w as writePortPreference, x as parseWorkspacePort, xt as saveWorkspace, y as MAX_WORKSPACE_PORT, z as telemetryUploadConsent, zt as CONFIG_PATH } from "./relative_time-CDvK_Zaj.js";
3
3
  import { basename, dirname, join, resolve } from "node:path";
4
4
  import { spawn } from "node:child_process";
5
5
  import { existsSync, mkdirSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
@@ -1250,6 +1250,19 @@ function agentUnusedByUpdate(agentId) {
1250
1250
  return `An update continues the review with the agent it was made by, so \`--agent ${agentId}\` changes nothing here. To analyse the same commit again with another agent, run \`prreviewbuddy review --reanalyse --agent ${agentId}\`.`;
1251
1251
  }
1252
1252
  /**
1253
+ * `--agent` was named alongside a resume, where it changes nothing either.
1254
+ *
1255
+ * A paused job carries the agent it was started under, and its finished phases were done by that
1256
+ * agent. Switching engines halfway would leave one review whose provenance and whose execution
1257
+ * disagree, so the flag does not mutate the job; it is said instead, for the reason above.
1258
+ *
1259
+ * Only when the two differ. Resuming a Codex job with `--agent codex` is the agent the reviewer
1260
+ * asked for, and telling them it was ignored would be true and useless.
1261
+ */
1262
+ function agentUnusedByResume(agentId) {
1263
+ return `A resume continues with the agent the review was started by, so \`--agent ${agentId}\` changes nothing here. To analyse the same commit with it instead, run \`prreviewbuddy review --reanalyse --agent ${agentId}\`.`;
1264
+ }
1265
+ /**
1253
1266
  * The update's own sentence, which the harness already wrote for the workspace strip, plus the
1254
1267
  * link. Not rephrased here: an update that stopped early has a specific reason and the reviewer
1255
1268
  * gets the same reason whichever surface asked for it.
@@ -1722,7 +1735,8 @@ async function review(command, repoPath) {
1722
1735
  return operate(command, workspace);
1723
1736
  }
1724
1737
  if (command.lens === "kiss") return kiss(command, target);
1725
- if (!await chooseFor(command)) return 1;
1738
+ const agent = await chooseFor(command);
1739
+ if (!agent) return 1;
1726
1740
  if (command.operation !== "fresh") {
1727
1741
  const existing = await findExistingReview(target);
1728
1742
  if (existing) {
@@ -1732,13 +1746,14 @@ async function review(command, repoPath) {
1732
1746
  out(existingReview(existing, url));
1733
1747
  return 0;
1734
1748
  }
1735
- err(resumingReview(failed, existing));
1749
+ err(resumingReview(failed.message, existing));
1750
+ if (command.agentId && command.agentId !== failed.agentId) err(agentUnusedByResume(command.agentId));
1736
1751
  return drive(existing.id, url);
1737
1752
  }
1738
1753
  }
1739
1754
  const workspaceId = await startJob({
1740
1755
  target,
1741
- ...command.agentId ? { agentId: command.agentId } : {}
1756
+ agentId: agent.id
1742
1757
  });
1743
1758
  const url = linkTo(await ensureServer(), workspaceId, loadWorkspace(workspaceId).token);
1744
1759
  out(startedReview(url, target));
@@ -1787,7 +1802,7 @@ async function kiss(command, target) {
1787
1802
  type: "kiss",
1788
1803
  audience
1789
1804
  },
1790
- ...command.agentId ? { agentId: command.agentId } : {}
1805
+ agentId: agent.id
1791
1806
  });
1792
1807
  const fresh = loadWorkspace(workspaceId);
1793
1808
  const run = (fresh.kissRuns ?? [])[0];
@@ -1905,7 +1920,10 @@ function failureOf(workspaceId) {
1905
1920
  const job = loadJob(workspace.jobId);
1906
1921
  if (!job || !isTerminal(job) || job.phase !== "failed") return null;
1907
1922
  if (isClaimed(job.id)) return null;
1908
- return job.failure?.message ?? "The reason was not recorded.";
1923
+ return {
1924
+ message: job.failure?.message ?? "The reason was not recorded.",
1925
+ agentId: job.env.agentId ?? DEFAULT_AGENT_ID
1926
+ };
1909
1927
  }
1910
1928
  /**
1911
1929
  * Run the job to its end, saying what it is doing while it does it.
@@ -10735,4 +10735,4 @@ function relativeTime(ms) {
10735
10735
  return `${days} day${days === 1 ? "" : "s"} ago`;
10736
10736
  }
10737
10737
  //#endregion
10738
- export { checkCodeFreshness as $, agentEnvOf as A, processDiscussion as At, BUILD_VERSION as B, STORE_ROOT as Bt, statedWorkspacePort as C, touchWorkspace as Ct, refreshPrContext as D, issuesOutstanding as Dt, updateReview as E, isQuestionOutstanding as Et, startJob as F, agentIdOf as Ft, forgeResolver as G, AgentCancelledError as Gt, feedbackUrl as H, agentById as Ht, readEvents as I, clearAgentPreference as It, clearClaim as J, fillFileUrlTemplate as K, AgentUnavailableError as Kt, record as L, readAgentPreference as Lt, startKissJob as M, resolveTarget as Mt, reanalyseReview as N, displayRef as Nt, isUnchanged as O, questionsOutstanding as Ot, runJob as P, git as Pt, removeWorktree as Q, recordTelemetryUploadConsent as R, writeAgentPreference as Rt, resolveWorkspacePort as S, summarise as St, RefreshUnavailableError as T, isIssueOutstanding as Tt, withUsageRecorded as U, agentFor as Ut, PACKAGE_NAME as V, AGENT_IDS as Vt, EXPLAIN_SIMPLY_PROMPT as W, detectAgents as Wt, MANAGED_ROOT as X, isClaimed as Y, readMarker as Z, writeServerRecord as _, recentReviewGroups as _t, liveJobsFor as a, saveJob as at, MIN_WORKSPACE_PORT as b, reviewedRepositories as bt, discardJob as c, followedRefName as ct, clearServerRecord as d, lineageKeyFor as dt, checkFreshness as et, ensureServer as f, lineagePosition as ft, workspaceUrl as g, previousKissResult as gt, stopServer as h, positionInLineage as ht, lineageIds as i, loadJob as it, recordKissRun as j, describeAuthorship as jt, askCheckout as k, reviewerDispositions as kt, readIndexToken as l, groupByLineage as lt, reviewsUrl as m, matchingWorkspaceIds as mt, deleteLineage as n, fail as nt, wasBlocked as o, PHASES as ot, readServerRecord as p, loadWorkspace as pt, ReviewBeingDeletedError as q, deleteReview as r, isTerminal as rt, runningJobs as s, progressSteps as st, relativeTime as t, allJobs as tt, bootstrapUrl as u, latestKissRun as ut, DEFAULT_WORKSPACE_PORT as v, recentWorkspaces as vt, writePortPreference as w, doneVerb as wt, parseWorkspacePort as x, saveWorkspace as xt, MAX_WORKSPACE_PORT as y, reviewedCommit as yt, telemetryUploadConsent as z, CONFIG_PATH as zt };
10738
+ export { checkCodeFreshness as $, agentEnvOf as A, processDiscussion as At, BUILD_VERSION as B, STORE_ROOT as Bt, statedWorkspacePort as C, touchWorkspace as Ct, refreshPrContext as D, issuesOutstanding as Dt, updateReview as E, isQuestionOutstanding as Et, startJob as F, agentIdOf as Ft, forgeResolver as G, detectAgents as Gt, feedbackUrl as H, DEFAULT_AGENT_ID as Ht, readEvents as I, clearAgentPreference as It, clearClaim as J, fillFileUrlTemplate as K, AgentCancelledError as Kt, record as L, readAgentPreference as Lt, startKissJob as M, resolveTarget as Mt, reanalyseReview as N, displayRef as Nt, isUnchanged as O, questionsOutstanding as Ot, runJob as P, git as Pt, removeWorktree as Q, recordTelemetryUploadConsent as R, writeAgentPreference as Rt, resolveWorkspacePort as S, summarise as St, RefreshUnavailableError as T, isIssueOutstanding as Tt, withUsageRecorded as U, agentById as Ut, PACKAGE_NAME as V, AGENT_IDS as Vt, EXPLAIN_SIMPLY_PROMPT as W, agentFor as Wt, MANAGED_ROOT as X, isClaimed as Y, readMarker as Z, writeServerRecord as _, recentReviewGroups as _t, liveJobsFor as a, saveJob as at, MIN_WORKSPACE_PORT as b, reviewedRepositories as bt, discardJob as c, followedRefName as ct, clearServerRecord as d, lineageKeyFor as dt, checkFreshness as et, ensureServer as f, lineagePosition as ft, workspaceUrl as g, previousKissResult as gt, stopServer as h, positionInLineage as ht, lineageIds as i, loadJob as it, recordKissRun as j, describeAuthorship as jt, askCheckout as k, reviewerDispositions as kt, readIndexToken as l, groupByLineage as lt, reviewsUrl as m, matchingWorkspaceIds as mt, deleteLineage as n, fail as nt, wasBlocked as o, PHASES as ot, readServerRecord as p, loadWorkspace as pt, ReviewBeingDeletedError as q, AgentUnavailableError as qt, deleteReview as r, isTerminal as rt, runningJobs as s, progressSteps as st, relativeTime as t, allJobs as tt, bootstrapUrl as u, latestKissRun as ut, DEFAULT_WORKSPACE_PORT as v, recentWorkspaces as vt, writePortPreference as w, doneVerb as wt, parseWorkspacePort as x, saveWorkspace as xt, MAX_WORKSPACE_PORT as y, reviewedCommit as yt, telemetryUploadConsent as z, CONFIG_PATH as zt };
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as checkCodeFreshness, A as agentEnvOf, At as processDiscussion, B as BUILD_VERSION, Bt as STORE_ROOT, C as statedWorkspacePort, Ct as touchWorkspace, D as refreshPrContext, Dt as issuesOutstanding, E as updateReview, Et as isQuestionOutstanding, Gt as AgentCancelledError, H as feedbackUrl, I as readEvents, It as clearAgentPreference, K as fillFileUrlTemplate, Kt as AgentUnavailableError, L as record, Lt as readAgentPreference, M as startKissJob, O as isUnchanged, Ot as questionsOutstanding, P as runJob, Pt as git, Q as removeWorktree, R as recordTelemetryUploadConsent, Rt as writeAgentPreference, S as resolveWorkspacePort, T as RefreshUnavailableError, Tt as isIssueOutstanding, U as withUsageRecorded, Ut as agentFor, Vt as AGENT_IDS, W as EXPLAIN_SIMPLY_PROMPT, X as MANAGED_ROOT, Y as isClaimed, Z as readMarker, _ as writeServerRecord, _t as recentReviewGroups, a as liveJobsFor, at as saveJob, b as MIN_WORKSPACE_PORT, c as discardJob, ct as followedRefName, d as clearServerRecord, et as checkFreshness, ft as lineagePosition, gt as previousKissResult, i as lineageIds, it as loadJob, jt as describeAuthorship, k as askCheckout, kt as reviewerDispositions, l as readIndexToken, n as deleteLineage, nt as fail, o as wasBlocked, ot as PHASES, p as readServerRecord, pt as loadWorkspace, q as ReviewBeingDeletedError, r as deleteReview, rt as isTerminal, st as progressSteps, t as relativeTime$1, tt as allJobs, ut as latestKissRun, v as DEFAULT_WORKSPACE_PORT, w as writePortPreference, wt as doneVerb, x as parseWorkspacePort, xt as saveWorkspace, y as MAX_WORKSPACE_PORT, yt as reviewedCommit, z as telemetryUploadConsent } from "./relative_time-DJ9iHDDG.js";
1
+ import { $ as checkCodeFreshness, A as agentEnvOf, At as processDiscussion, B as BUILD_VERSION, Bt as STORE_ROOT, C as statedWorkspacePort, Ct as touchWorkspace, D as refreshPrContext, Dt as issuesOutstanding, E as updateReview, Et as isQuestionOutstanding, H as feedbackUrl, I as readEvents, It as clearAgentPreference, K as fillFileUrlTemplate, Kt as AgentCancelledError, L as record, Lt as readAgentPreference, M as startKissJob, O as isUnchanged, Ot as questionsOutstanding, P as runJob, Pt as git, Q as removeWorktree, R as recordTelemetryUploadConsent, Rt as writeAgentPreference, S as resolveWorkspacePort, T as RefreshUnavailableError, Tt as isIssueOutstanding, U as withUsageRecorded, Vt as AGENT_IDS, W as EXPLAIN_SIMPLY_PROMPT, Wt as agentFor, X as MANAGED_ROOT, Y as isClaimed, Z as readMarker, _ as writeServerRecord, _t as recentReviewGroups, a as liveJobsFor, at as saveJob, b as MIN_WORKSPACE_PORT, c as discardJob, ct as followedRefName, d as clearServerRecord, et as checkFreshness, ft as lineagePosition, gt as previousKissResult, i as lineageIds, it as loadJob, jt as describeAuthorship, k as askCheckout, kt as reviewerDispositions, l as readIndexToken, n as deleteLineage, nt as fail, o as wasBlocked, ot as PHASES, p as readServerRecord, pt as loadWorkspace, q as ReviewBeingDeletedError, qt as AgentUnavailableError, r as deleteReview, rt as isTerminal, st as progressSteps, t as relativeTime$1, tt as allJobs, ut as latestKissRun, v as DEFAULT_WORKSPACE_PORT, w as writePortPreference, wt as doneVerb, x as parseWorkspacePort, xt as saveWorkspace, y as MAX_WORKSPACE_PORT, yt as reviewedCommit, z as telemetryUploadConsent } from "./relative_time-CDvK_Zaj.js";
2
2
  import { isAbsolute, join, relative, resolve } from "node:path";
3
3
  import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
4
4
  import { timingSafeEqual } from "node:crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prreviewbuddy",
3
- "version": "0.25.6",
3
+ "version": "0.25.7",
4
4
  "description": "Review a branch or pull request in an isolated checkout, from your terminal, with the coding agent you already have installed.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://prreviewbuddy.com",