waypoint-codex 1.0.17 → 1.0.19

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.
@@ -76,18 +76,90 @@ export function compareVersions(left, right) {
76
76
  }
77
77
  return 0;
78
78
  }
79
- function latestWaypointVersion(options) {
80
- const npmBinary = options.npmBinary ?? process.env.WAYPOINT_NPM_COMMAND ?? npmBinaryForPlatform();
81
- const latest = spawnSync(npmBinary, ["view", "waypoint-codex", "version"], {
79
+ function spawnNpmPipe(npmBinary, args) {
80
+ const result = spawnSync(npmBinary, args, {
82
81
  stdio: "pipe",
83
82
  encoding: "utf8",
84
83
  });
85
- if ((latest.status ?? 1) !== 0) {
84
+ return {
85
+ status: result.status ?? 1,
86
+ stdout: result.stdout ?? "",
87
+ stderr: result.stderr ?? "",
88
+ };
89
+ }
90
+ function writePipedOutput(result, stdio) {
91
+ if (stdio !== "inherit") {
92
+ return;
93
+ }
94
+ if (result.stdout.length > 0) {
95
+ process.stdout.write(result.stdout);
96
+ }
97
+ if (result.stderr.length > 0) {
98
+ process.stderr.write(result.stderr);
99
+ }
100
+ }
101
+ function latestWaypointVersion(options) {
102
+ const npmBinary = options.npmBinary ?? process.env.WAYPOINT_NPM_COMMAND ?? npmBinaryForPlatform();
103
+ const latest = spawnNpmPipe(npmBinary, ["view", "waypoint-codex", "version"]);
104
+ if (latest.status !== 0) {
86
105
  return null;
87
106
  }
88
- const version = latest.stdout?.trim();
107
+ const version = latest.stdout.trim();
89
108
  return version ? version : null;
90
109
  }
110
+ function latestWaypointTarballUrl(options) {
111
+ const tarball = spawnNpmPipe(options.npmBinary, ["view", `waypoint-codex@${options.version}`, "dist.tarball"]);
112
+ if (tarball.status !== 0) {
113
+ return null;
114
+ }
115
+ const tarballUrl = tarball.stdout.trim();
116
+ return tarballUrl.length > 0 ? tarballUrl : null;
117
+ }
118
+ function appendCacheBust(url) {
119
+ try {
120
+ const parsed = new URL(url);
121
+ parsed.searchParams.set("waypointCacheBust", `${Date.now()}`);
122
+ return parsed.toString();
123
+ }
124
+ catch {
125
+ const separator = url.includes("?") ? "&" : "?";
126
+ return `${url}${separator}waypointCacheBust=${Date.now()}`;
127
+ }
128
+ }
129
+ function isTransientTarball404(result) {
130
+ const combined = `${result.stdout}\n${result.stderr}`;
131
+ return /E404/.test(combined) && /waypoint-codex-.*\.tgz/i.test(combined);
132
+ }
133
+ function installLatestWaypointCli(options) {
134
+ const primary = spawnNpmPipe(options.npmBinary, ["install", "-g", "waypoint-codex@latest"]);
135
+ if (primary.status === 0) {
136
+ writePipedOutput(primary, options.stdio);
137
+ return 0;
138
+ }
139
+ if (!isTransientTarball404(primary)) {
140
+ writePipedOutput(primary, options.stdio);
141
+ return primary.status;
142
+ }
143
+ const latestVersion = options.knownLatestVersion ?? latestWaypointVersion({ npmBinary: options.npmBinary });
144
+ if (!latestVersion) {
145
+ writePipedOutput(primary, options.stdio);
146
+ return primary.status;
147
+ }
148
+ const tarballUrl = latestWaypointTarballUrl({
149
+ npmBinary: options.npmBinary,
150
+ version: latestVersion,
151
+ });
152
+ if (!tarballUrl) {
153
+ writePipedOutput(primary, options.stdio);
154
+ return primary.status;
155
+ }
156
+ if (options.stdio === "inherit") {
157
+ console.log(`Waypoint npm install hit a transient tarball 404 for ${latestVersion}. Retrying with cache-busted URL...`);
158
+ }
159
+ const fallback = spawnNpmPipe(options.npmBinary, ["install", "-g", appendCacheBust(tarballUrl)]);
160
+ writePipedOutput(fallback, options.stdio);
161
+ return fallback.status;
162
+ }
91
163
  function hasWaypointConfig(projectRoot) {
92
164
  return existsSync(path.join(projectRoot, ".waypoint/config.toml"));
93
165
  }
@@ -95,11 +167,12 @@ export function upgradeWaypoint(options) {
95
167
  const nodeBinary = options.nodeBinary ?? process.execPath;
96
168
  const npmBinary = options.npmBinary ?? process.env.WAYPOINT_NPM_COMMAND ?? npmBinaryForPlatform();
97
169
  const stdio = options.stdio ?? "inherit";
98
- const update = spawnSync(npmBinary, ["install", "-g", "waypoint-codex@latest"], {
170
+ const updateStatus = installLatestWaypointCli({
171
+ npmBinary,
99
172
  stdio,
100
173
  });
101
- if ((update.status ?? 1) !== 0) {
102
- return update.status ?? 1;
174
+ if (updateStatus !== 0) {
175
+ return updateStatus;
103
176
  }
104
177
  if (options.skipRepoRefresh) {
105
178
  console.log("Waypoint CLI updated. Skipped repo refresh.");
@@ -129,11 +202,13 @@ export function maybeUpgradeWaypointBeforeInit(options) {
129
202
  return null;
130
203
  }
131
204
  console.log(`Waypoint CLI ${options.currentVersion} is older than latest ${latestVersion}. Updating before init...`);
132
- const update = spawnSync(npmBinary, ["install", "-g", "waypoint-codex@latest"], {
205
+ const updateStatus = installLatestWaypointCli({
206
+ npmBinary,
133
207
  stdio,
208
+ knownLatestVersion: latestVersion,
134
209
  });
135
- if ((update.status ?? 1) !== 0) {
136
- return update.status ?? 1;
210
+ if (updateStatus !== 0) {
211
+ return updateStatus;
137
212
  }
138
213
  const reexecArgs = options.initArgs.includes("--skip-cli-update")
139
214
  ? options.initArgs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waypoint-codex",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "Make Codex better by default with stronger planning, code quality, reviews, tracking, and repo guidance.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pr-review
3
- description: Run and close the full PR review loop with CodeRabbit and Codex reviewers. Use when a PR already has review activity or when you need to request, wait for, triage, fix, and re-request automated review until no meaningful issues remain and CI/CD is green.
3
+ description: Run and close the full PR review loop with CodeRabbit and Codex reviewers. Use when a PR already has review activity or when you need to request, wait for, triage, fix, and re-request automated review until no major (`P1+`) issues remain and CI/CD is green.
4
4
  ---
5
5
 
6
6
  # PR review
@@ -22,8 +22,10 @@ Run this loop until exit criteria are satisfied.
22
22
  - collect CI/CD status for required checks
23
23
 
24
24
  2. Triage and act:
25
- - treat each reviewer finding as actionable unless it is clearly a false positive
26
- - fix all non-false-positive findings in code/docs/tests
25
+ - classify each reviewer finding as either major (`P1+`) or minor/nitpick
26
+ - treat major (`P1+`) findings as mandatory unless they are clearly false positives
27
+ - fix all non-false-positive major (`P1+`) findings in code/docs/tests
28
+ - minor/nitpick findings may be accepted without code changes, but must still be replied to inline and resolved
27
29
  - if CI/CD has failures, fix those failures as part of the same loop
28
30
 
29
31
  3. Thread discipline for every addressed or skipped finding:
@@ -39,17 +41,17 @@ Run this loop until exit criteria are satisfied.
39
41
  - wait up to 30 minutes total
40
42
  - check every 5 minutes using a sleep interval (`sleep 300`)
41
43
  - on each check, re-read both review and CI/CD status
42
- - if meaningful findings or CI/CD failures appear, continue the loop immediately
44
+ - if major (`P1+`) findings or CI/CD failures appear, continue the loop immediately
43
45
 
44
46
  ## Exit Criteria
45
47
 
46
48
  You may end the loop only when all are true:
47
49
 
48
- - no unresolved meaningful CodeRabbit findings remain
49
- - no unresolved meaningful Codex findings remain
50
+ - no unresolved major (`P1+`) CodeRabbit findings remain
51
+ - no unresolved major (`P1+`) Codex findings remain
50
52
  - every addressed or skipped finding has an inline reply and is resolved
51
53
  - CI/CD is green (or explicitly non-blocking per repo policy)
52
- - the latest reviewer rounds contain no meaningful new issues
54
+ - the latest reviewer rounds contain only nitpicks/minor issues (no major `P1+` issues)
53
55
 
54
56
  ## Required Behavior
55
57
 
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "PR Review"
3
3
  short_description: "Close the review loop with CodeRabbit, Codex, and CI/CD"
4
- default_prompt: "Use $pr-review: address all existing PR review findings, fix actionable CI/CD failures, reply inline and resolve each handled thread, push fixes, comment '@coderabbitai review' and '@codex review', then poll every 5 minutes for up to 30 minutes per round until no meaningful new issues remain."
4
+ default_prompt: "Use $pr-review: address all existing PR review findings, fix actionable CI/CD failures, reply inline and resolve each handled thread, push fixes, comment '@coderabbitai review' and '@codex review', then poll every 5 minutes for up to 30 minutes per round until no major (P1+) issues remain and latest comments are only minor or nitpicks."