@rallycry/conveyor-agent 10.13.14 → 10.13.15

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/dist/cli.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  runUsageProbe,
29
29
  sampleKeyUsage,
30
30
  textResult
31
- } from "./chunk-J4UH5TOO.js";
31
+ } from "./chunk-SAHOFQBQ.js";
32
32
  import "./chunk-7TQO4ZF4.js";
33
33
  import {
34
34
  getWorkbenchClient
@@ -47,13 +47,11 @@ import "./chunk-VKZ5W2VO.js";
47
47
 
48
48
  // src/cli.ts
49
49
  import { readFileSync } from "fs";
50
- import { join as join3, dirname as dirname3 } from "path";
50
+ import { join as join3, dirname as dirname2 } from "path";
51
51
  import { fileURLToPath } from "url";
52
52
 
53
53
  // src/setup/sidecars.ts
54
54
  import net from "net";
55
- import { mkdir, writeFile } from "fs/promises";
56
- import { dirname } from "path";
57
55
  var POSTGRES_TIMEOUT_MS = 12e4;
58
56
  var FIREBASE_TIMEOUT_MS = 6e4;
59
57
  var FALLBACK_TIMEOUT_MS = 3e4;
@@ -61,22 +59,6 @@ var DEFAULT_SIDECAR_POLL_INTERVAL_MS = 1e3;
61
59
  var DEFAULT_PROBE_TIMEOUT_MS = 2e3;
62
60
  var POSTGRES_DEFAULT_PORT = 5432;
63
61
  var FIREBASE_DEFAULT_PORT = 9099;
64
- async function startLazySidecars(env, onLog, signal) {
65
- throwIfAborted(signal);
66
- const markerPath = env.CONVEYOR_SIDECAR_START_FILE;
67
- if (!markerPath) return;
68
- try {
69
- await mkdir(dirname(markerPath), { recursive: true });
70
- throwIfAborted(signal);
71
- await writeFile(markerPath, "start\n", "utf8");
72
- throwIfAborted(signal);
73
- onLog("Started lazy sidecars");
74
- } catch (err) {
75
- if (signal?.aborted) throw abortError();
76
- const message = err instanceof Error ? err.message : String(err);
77
- onLog(`WARNING: failed to start lazy sidecars: ${message}`);
78
- }
79
- }
80
62
  function parseHostPort(value, defaultPort) {
81
63
  const trimmed = value.trim().replace(/^[a-z]+:\/\//i, "");
82
64
  if (!trimmed) return null;
@@ -203,12 +185,8 @@ async function waitForSidecars(opts = {}) {
203
185
  timeoutMs,
204
186
  pollIntervalMs = DEFAULT_SIDECAR_POLL_INTERVAL_MS,
205
187
  probe = defaultProbe,
206
- startLazy = true,
207
188
  signal
208
189
  } = opts;
209
- if (startLazy) {
210
- await startLazySidecars(env, onLog, signal);
211
- }
212
190
  throwIfAborted(signal);
213
191
  const targets = resolveSidecarTargets(env);
214
192
  if (targets.length === 0) return;
@@ -278,7 +256,6 @@ var WorkspaceCommandSupervisor = class {
278
256
  connection;
279
257
  env;
280
258
  awaitGitReadyFn;
281
- startLazySidecarsFn;
282
259
  waitForSidecarsFn;
283
260
  runStartCommandFn;
284
261
  loadForwardPortsFn;
@@ -313,8 +290,7 @@ var WorkspaceCommandSupervisor = class {
313
290
  onLog: opts.onLog,
314
291
  signal: opts.signal
315
292
  }));
316
- this.startLazySidecarsFn = options.startLazySidecars ?? ((env, onLog, signal) => startLazySidecars(env, onLog, signal));
317
- this.waitForSidecarsFn = options.waitForSidecars ?? ((opts) => waitForSidecars({ onLog: opts.onLog, startLazy: opts.startLazy, signal: opts.signal }));
293
+ this.waitForSidecarsFn = options.waitForSidecars ?? ((opts) => waitForSidecars({ onLog: opts.onLog, signal: opts.signal }));
318
294
  const executors = defaultCommandExecutors();
319
295
  this.runStartCommandFn = options.runStartCommand ?? executors.runStartCommand;
320
296
  this.loadForwardPortsFn = options.loadForwardPorts ?? loadForwardPorts;
@@ -328,14 +304,6 @@ var WorkspaceCommandSupervisor = class {
328
304
  if (this.started || this.stopped) return;
329
305
  this.started = true;
330
306
  this.connection.onRunStartCommand(() => this.restartStartCommand());
331
- this.trackBackgroundTask(
332
- this.startLazySidecarsFn(
333
- this.env,
334
- (message) => this.forwardSetupOutput("stdout", `[sidecars] ${message}
335
- `),
336
- this.abortController.signal
337
- ).catch((error) => this.reportUnexpectedError(error))
338
- );
339
307
  if (this.config) {
340
308
  this.trackBackgroundTask(
341
309
  this.runSetupAndStart().catch((error) => this.reportUnexpectedError(error))
@@ -380,7 +348,6 @@ var WorkspaceCommandSupervisor = class {
380
348
  await this.waitForSidecarsFn({
381
349
  onLog: (message) => this.forwardSetupOutput("stdout", `[sidecars] ${message}
382
350
  `),
383
- startLazy: false,
384
351
  signal: this.abortController.signal
385
352
  });
386
353
  if (this.stopped) return;
@@ -720,7 +687,7 @@ var ProjectSessionRunner = class {
720
687
  };
721
688
 
722
689
  // src/usage/multi-key-probe.ts
723
- import { mkdtemp, writeFile as writeFile2, copyFile, rm } from "fs/promises";
690
+ import { mkdtemp, writeFile, copyFile, rm } from "fs/promises";
724
691
  import { tmpdir } from "os";
725
692
  import { join } from "path";
726
693
  var logger = createServiceLogger("multi-key-probe");
@@ -751,7 +718,7 @@ async function isolatedProbe(token, now) {
751
718
  let dir = null;
752
719
  try {
753
720
  dir = await mkdtemp(join(tmpdir(), "conveyor-usage-"));
754
- await writeFile2(join(dir, ".credentials.json"), buildSynthesizedCredentials(token, now), {
721
+ await writeFile(join(dir, ".credentials.json"), buildSynthesizedCredentials(token, now), {
755
722
  encoding: "utf8",
756
723
  mode: 384
757
724
  });
@@ -792,7 +759,7 @@ async function probeKeysUsage(keys, deps = {}) {
792
759
 
793
760
  // src/harness/pty/adapters/opencode-auth.ts
794
761
  import { promises as fs } from "fs";
795
- import { dirname as dirname2, join as join2 } from "path";
762
+ import { dirname, join as join2 } from "path";
796
763
  import { homedir } from "os";
797
764
  var logger2 = createServiceLogger("opencode-auth");
798
765
  var OPENCODE_CODEX_PLUGIN = "opencode-openai-codex-auth@4.4.0";
@@ -833,7 +800,7 @@ async function readJsonFile(path) {
833
800
  }
834
801
  }
835
802
  async function writeJsonFile(path, value) {
836
- await fs.mkdir(dirname2(path), { recursive: true });
803
+ await fs.mkdir(dirname(path), { recursive: true });
837
804
  await fs.writeFile(path, `${JSON.stringify(value, null, 2)}
838
805
  `, { mode: 384 });
839
806
  }
@@ -1923,7 +1890,7 @@ function createSpawnedChildRunner(inputs) {
1923
1890
 
1924
1891
  // src/cli.ts
1925
1892
  if (process.argv.includes("--version")) {
1926
- const __dirname = dirname3(fileURLToPath(import.meta.url));
1893
+ const __dirname = dirname2(fileURLToPath(import.meta.url));
1927
1894
  const pkgPath = join3(__dirname, "..", "package.json");
1928
1895
  const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
1929
1896
  process.stdout.write(pkg.version + "\n");
@@ -2013,7 +1980,7 @@ if (process.env.CONVEYOR_MODE === "workbench") {
2013
1980
  logger6.error("workbench mode requires POD_BOOTSTRAP_TOKEN (or CONVEYOR_WORKBENCH_TOKEN)");
2014
1981
  process.exit(1);
2015
1982
  }
2016
- const pkgDir = dirname3(fileURLToPath(import.meta.url));
1983
+ const pkgDir = dirname2(fileURLToPath(import.meta.url));
2017
1984
  const pkg = JSON.parse(readFileSync(join3(pkgDir, "..", "package.json"), "utf-8"));
2018
1985
  const handle = await startWorkbenchServer({
2019
1986
  port,