@rallycry/conveyor-agent 11.0.22 → 11.0.24

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  startWorkbenchServer
3
- } from "./chunk-EIHZRSYI.js";
3
+ } from "./chunk-EITUTXXJ.js";
4
4
  import {
5
5
  TOMBSTONE_MESSAGE,
6
6
  isLegacyEntrypointLaunch
@@ -12,7 +12,7 @@ import {
12
12
  refreshSkillsAfterCheckout,
13
13
  runPreReadyBinds
14
14
  } from "./chunk-37J5MMQT.js";
15
- import "./chunk-W5INK3NE.js";
15
+ import "./chunk-WCJ6HRVU.js";
16
16
  import {
17
17
  GitPrepJob,
18
18
  defaultGit,
@@ -217,6 +217,30 @@ async function runPipeline(steps, ctx) {
217
217
  );
218
218
  }
219
219
 
220
+ // src/boot/bootstrap-refusal.ts
221
+ var BootstrapRejectedError = class extends Error {
222
+ constructor(message, code) {
223
+ super(message);
224
+ this.code = code;
225
+ this.name = "BootstrapRejectedError";
226
+ }
227
+ code;
228
+ };
229
+ async function readRefusal(res) {
230
+ if (res.status < 400 || res.status >= 500) return void 0;
231
+ let body;
232
+ try {
233
+ body = JSON.parse(await res.text());
234
+ } catch {
235
+ return void 0;
236
+ }
237
+ const payload = body;
238
+ if (payload?.retryable !== false) return void 0;
239
+ const message = typeof payload.error === "string" ? payload.error : "bootstrap refused";
240
+ const code = typeof payload.code === "string" ? payload.code : void 0;
241
+ return new BootstrapRejectedError(`${message} (HTTP ${res.status})`, code);
242
+ }
243
+
220
244
  // src/boot/poll.ts
221
245
  var BootstrapUnauthorizedError = class extends Error {
222
246
  constructor(message) {
@@ -261,6 +285,10 @@ async function pollBootstrapBundle(apiUrl, token, deps) {
261
285
  if (res?.status === 401) {
262
286
  throw new BootstrapUnauthorizedError("bootstrap token rejected (401) \u2014 pod identity invalid");
263
287
  }
288
+ if (res) {
289
+ const refusal = await readRefusal(res);
290
+ if (refusal) throw refusal;
291
+ }
264
292
  pollCount++;
265
293
  if (pollCount % PROGRESS_LOG_EVERY === 0) {
266
294
  deps.log.info(`[boot] Still waiting for bind (poll #${pollCount})...`);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadPtySpawn
3
- } from "./chunk-W5INK3NE.js";
3
+ } from "./chunk-WCJ6HRVU.js";
4
4
  import {
5
5
  terminateProcessGroup
6
6
  } from "./chunk-W4LZ7R6Z.js";