@rallycry/conveyor-agent 11.0.44 → 11.0.46

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.
@@ -371,21 +371,11 @@ var GitPrepJob = class {
371
371
 
372
372
  // src/setup/boot-milestone.ts
373
373
  var REPORT_TIMEOUT_MS = 5e3;
374
- var socketFallback = null;
375
- function registerBootMilestoneSocketFallback(fn) {
376
- socketFallback = fn;
377
- }
378
374
  async function reportBootMilestone(opts) {
379
375
  const env = opts.env ?? process.env;
380
376
  const apiUrl = env.CONVEYOR_API_URL;
381
377
  const token = env.POD_BOOTSTRAP_TOKEN;
382
- if (!apiUrl || !token) {
383
- try {
384
- socketFallback?.(opts.key);
385
- } catch {
386
- }
387
- return false;
388
- }
378
+ if (!apiUrl || !token) return false;
389
379
  const fetchFn = opts.fetchFn ?? fetch;
390
380
  const controller = new AbortController();
391
381
  const timer = setTimeout(() => controller.abort(), opts.timeoutMs ?? REPORT_TIMEOUT_MS);
@@ -416,6 +406,5 @@ export {
416
406
  GIT_PREP_MAX_RETRIES,
417
407
  DEFAULT_RETRY_DELAY_MS,
418
408
  GitPrepJob,
419
- registerBootMilestoneSocketFallback,
420
409
  reportBootMilestone
421
410
  };
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  WorkspaceCommandSupervisor,
8
8
  startWorkspaceCommandsAfterConnect,
9
9
  stopWorkspaceCommands
10
- } from "./chunk-4H75HQVM.js";
10
+ } from "./chunk-A43UZ5RC.js";
11
11
  import {
12
12
  PtyHarness,
13
13
  SessionRunner,
@@ -27,8 +27,8 @@ import {
27
27
  runUsageProbe,
28
28
  sampleKeyUsage,
29
29
  usesNativeUsageReporting
30
- } from "./chunk-42YPRICN.js";
31
- import "./chunk-37J5MMQT.js";
30
+ } from "./chunk-2SIMOUOD.js";
31
+ import "./chunk-6CKFZ4JG.js";
32
32
  import {
33
33
  inheritedEnv,
34
34
  resolvePtySpawn,
@@ -36,19 +36,16 @@ import {
36
36
  } from "./chunk-EKTPDG3G.js";
37
37
  import {
38
38
  AgentConnection,
39
- CodespacePortVisibility,
40
39
  DEFAULT_LIFECYCLE_CONFIG,
41
40
  DEFAULT_SONNET_MODEL,
42
41
  Lifecycle,
43
42
  PortDiscovery,
44
43
  RUNNER_MODES,
45
- applyBootstrapToEnv,
46
44
  createServiceLogger,
47
- fetchBootstrap,
48
45
  loadAndAnnotateDiscoveredPorts,
49
46
  loadConveyorConfig
50
- } from "./chunk-KMBMW3J3.js";
51
- import "./chunk-Q4FQOJ7D.js";
47
+ } from "./chunk-SKAFB6DG.js";
48
+ import "./chunk-VIUZS7V4.js";
52
49
  import "./chunk-W4LZ7R6Z.js";
53
50
  import "./chunk-372R6E4C.js";
54
51
  import "./chunk-IA45XHOA.js";
@@ -415,11 +412,9 @@ var AdhocSessionRunner = class {
415
412
  buildAdhocPtyBridge(this.connection, () => this.lifecycle.startIdleTimer()),
416
413
  resolveTuiAdapter(resolveAdhocTui(process.env))
417
414
  );
418
- const portVisibility = new CodespacePortVisibility();
419
415
  this.portDiscovery = deps?.portDiscovery ?? new PortDiscovery({
420
416
  report: (ports) => this.connection.reportDiscoveredPorts(ports),
421
- annotate: (ports) => loadAndAnnotateDiscoveredPorts(config.workspaceDir, ports),
422
- onReported: (ports) => portVisibility.ensureVisible(ports.map(({ port }) => port))
417
+ annotate: (ports) => loadAndAnnotateDiscoveredPorts(config.workspaceDir, ports)
423
418
  });
424
419
  this.commandSupervisor = deps?.commandSupervisor ?? new WorkspaceCommandSupervisor({
425
420
  config: loadConveyorConfig(),
@@ -1217,7 +1212,7 @@ function wireSpawnChildren(mode, connection, supervisors, logger7) {
1217
1212
 
1218
1213
  // src/cli.ts
1219
1214
  if (process.argv[2] === "boot") {
1220
- const { runBoot } = await import("./boot-T5HQVF3W.js");
1215
+ const { runBoot } = await import("./boot-5AZLXH5M.js");
1221
1216
  process.exit(await runBoot(process.argv.slice(3)));
1222
1217
  }
1223
1218
  if (isLegacyEntrypointLaunch(process.env)) {
@@ -1249,39 +1244,6 @@ function logAgentExit(reason, opts) {
1249
1244
  });
1250
1245
  logger6[exitLogLevel(reason)]("agent_exit", payload);
1251
1246
  }
1252
- async function bootstrapFromCodespace(apiUrl, instanceName) {
1253
- const bootstrapToken = process.env.CONVEYOR_BOOTSTRAP_TOKEN;
1254
- const apiUrlFromEnv = Boolean(process.env.CONVEYOR_API_URL);
1255
- logger6.info("Bootstrapping from codespace", {
1256
- codespace: instanceName,
1257
- apiUrl,
1258
- apiUrlFromEnv,
1259
- bootstrapTokenPresent: Boolean(bootstrapToken)
1260
- });
1261
- const result = await fetchBootstrap({
1262
- apiUrl,
1263
- instanceName,
1264
- bootstrapToken
1265
- });
1266
- if (!result.ok) {
1267
- logger6.error("Bootstrap failed after retries", {
1268
- reason: result.reason,
1269
- attempts: result.attempts,
1270
- status: result.status,
1271
- detail: result.detail,
1272
- apiUrl,
1273
- apiUrlFromEnv,
1274
- bootstrapTokenPresent: Boolean(bootstrapToken),
1275
- hint: apiUrlFromEnv ? "Verify the codespace was created by this Conveyor deployment and that the bootstrap token is current." : "CONVEYOR_API_URL was not set as a codespace secret \u2014 agent fell back to the built-in default. Re-create the codespace, or push CONVEYOR_API_URL via project settings."
1276
- });
1277
- process.exit(1);
1278
- }
1279
- applyBootstrapToEnv(result.config);
1280
- logger6.info("Bootstrap complete", {
1281
- taskId: result.config.taskId,
1282
- attempts: result.attempts
1283
- });
1284
- }
1285
1247
  function isExpectedAbortError(error) {
1286
1248
  const message2 = error.message || "";
1287
1249
  const hasAbortMessage = /operation aborted/i.test(message2) || /abort/i.test(message2);
@@ -1347,15 +1309,6 @@ if (process.env.CONVEYOR_MODE === "workbench") {
1347
1309
  }
1348
1310
  var DEFAULT_CONVEYOR_API_URL = "https://api.conveyor.rallycryapp.com";
1349
1311
  var conveyorApiUrl = process.env.CONVEYOR_API_URL || DEFAULT_CONVEYOR_API_URL;
1350
- var INSTANCE_NAME = process.env.CODESPACE_NAME || process.env.CLAUDESPACE_NAME;
1351
- if (INSTANCE_NAME && !process.env.CONVEYOR_TASK_TOKEN) {
1352
- if (!conveyorApiUrl) {
1353
- logger6.error("Could not resolve CONVEYOR_API_URL for codespace bootstrap");
1354
- process.exit(1);
1355
- }
1356
- await bootstrapFromCodespace(conveyorApiUrl, INSTANCE_NAME);
1357
- conveyorApiUrl = process.env.CONVEYOR_API_URL ?? conveyorApiUrl;
1358
- }
1359
1312
  var CONVEYOR_TASK_TOKEN = process.env.CONVEYOR_TASK_TOKEN;
1360
1313
  var CONVEYOR_TASK_ID = process.env.CONVEYOR_TASK_ID;
1361
1314
  var CONVEYOR_WORKSPACE = process.env.CONVEYOR_WORKSPACE ?? process.cwd();
@@ -1455,7 +1408,7 @@ if (!CONVEYOR_TASK_TOKEN || !CONVEYOR_TASK_ID) {
1455
1408
  logger6.error(" CONVEYOR_TASK_TOKEN - JWT token for task authentication");
1456
1409
  logger6.error(" CONVEYOR_TASK_ID - ID of the task to execute");
1457
1410
  logger6.error("");
1458
- logger6.error("CONVEYOR_API_URL is provided via codespace secret or bootstrap.");
1411
+ logger6.error("CONVEYOR_API_URL defaults to the hosted API when unset.");
1459
1412
  logger6.error("");
1460
1413
  logger6.error("Optional:");
1461
1414
  logger6.error(" CONVEYOR_MODE - Runner mode: 'task' (default), 'pack', or 'pm'");
@@ -1470,7 +1423,7 @@ if (!RUNNER_MODES.includes(CONVEYOR_MODE)) {
1470
1423
  process.exit(1);
1471
1424
  }
1472
1425
  if (CONVEYOR_MODE === "serving") {
1473
- const { runServingSession } = await import("./serve-boot-TZZ45CJR.js");
1426
+ const { runServingSession } = await import("./serve-boot-HRMFAX7H.js");
1474
1427
  exitContext.runnerMode = "serving";
1475
1428
  exitContext.sessionId = process.env.CONVEYOR_SESSION_ID ?? exitContext.sessionId;
1476
1429
  const outcome = await runServingSession({
@@ -1530,8 +1483,8 @@ var runner = new SessionRunner(
1530
1483
  connection: {
1531
1484
  apiUrl: conveyorApiUrl ?? "",
1532
1485
  taskToken: CONVEYOR_TASK_TOKEN,
1533
- // CONVEYOR_SESSION_ID is the CodespaceSession ID for BaseService ACL.
1534
- // Falls back to CONVEYOR_TASK_ID for backward compat (codespace bootstrap sets only task ID).
1486
+ // CONVEYOR_SESSION_ID is the WorkspaceSession ID for BaseService ACL.
1487
+ // Falls back to CONVEYOR_TASK_ID for backward compat.
1535
1488
  sessionId: process.env.CONVEYOR_SESSION_ID ?? CONVEYOR_TASK_ID,
1536
1489
  runnerMode: CONVEYOR_MODE
1537
1490
  },
package/dist/index.d.ts CHANGED
@@ -361,10 +361,6 @@ declare class AgentConnection {
361
361
  * Throws on failure so the PortDiscovery poller can retry on its next
362
362
  * tick (a swallowed error here would silently drop the delta). */
363
363
  reportDiscoveredPorts(ports: WorkspaceDiscoveredPort[]): Promise<void>;
364
- /** Boot-milestone report over the socket — the codespace-parity fallback
365
- * for the GKE pod bootstrap-token route. Fire-and-forget: a failed report
366
- * must never delay or fail the boot path. */
367
- reportBootMilestone(key: string): void;
368
364
  sendTypingStart(): void;
369
365
  sendTypingStop(): void;
370
366
  emitRateLimitPause(resetsAt: string): void;
@@ -418,8 +414,6 @@ declare class AgentConnection {
418
414
  private lastTaskTokenRefreshAt;
419
415
  refreshTaskTokenFromBootstrap(): Promise<boolean>;
420
416
  private refreshFromBootstrap;
421
- /** Legacy GitHub Codespaces refresh path — keys on instance name. */
422
- private refreshFromCodespaceBootstrap;
423
417
  /**
424
418
  * v3 refresh: re-fetch the full bootstrap bundle from the pod's bound v3
425
419
  * route and swap the credentials in place. The GitHub installation token
@@ -594,7 +588,7 @@ interface LifecycleConfig {
594
588
  /** Periodic WIP git flush interval (default: 2 min). Covers ungraceful
595
589
  * pod termination (OOMKilled, node eviction) where preStop doesn't run.
596
590
  * Set to `0` to disable the timer entirely — used for environments with
597
- * persistent state (local, workspace, GitHub Codespaces) that don't lose
591
+ * persistent state (local, workspace) that don't lose
598
592
  * in-flight work on a crash. */
599
593
  gitFlushIntervalMs: number;
600
594
  /** Claude key usage sample interval (default: 5 min). Polls the Anthropic
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  SessionRunner,
3
3
  unshallowRepo
4
- } from "./chunk-42YPRICN.js";
5
- import "./chunk-37J5MMQT.js";
4
+ } from "./chunk-2SIMOUOD.js";
5
+ import "./chunk-6CKFZ4JG.js";
6
6
  import "./chunk-EKTPDG3G.js";
7
7
  import {
8
8
  AgentConnection,
@@ -17,8 +17,8 @@ import {
17
17
  stageAndCommit,
18
18
  updateRemoteToken,
19
19
  workspacePathExists
20
- } from "./chunk-KMBMW3J3.js";
21
- import "./chunk-Q4FQOJ7D.js";
20
+ } from "./chunk-SKAFB6DG.js";
21
+ import "./chunk-VIUZS7V4.js";
22
22
  import {
23
23
  runAuthTokenCommand,
24
24
  runSetupCommand,
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  WorkspaceCommandSupervisor
3
- } from "./chunk-4H75HQVM.js";
3
+ } from "./chunk-A43UZ5RC.js";
4
4
  import {
5
5
  AgentConnection,
6
- CodespacePortVisibility,
7
6
  DEFAULT_LIFECYCLE_CONFIG,
8
7
  Lifecycle,
9
8
  PortDiscovery,
@@ -12,8 +11,8 @@ import {
12
11
  ensureOnTaskBranch,
13
12
  loadAndAnnotateDiscoveredPorts,
14
13
  loadConveyorConfig
15
- } from "./chunk-KMBMW3J3.js";
16
- import "./chunk-Q4FQOJ7D.js";
14
+ } from "./chunk-SKAFB6DG.js";
15
+ import "./chunk-VIUZS7V4.js";
17
16
  import "./chunk-W4LZ7R6Z.js";
18
17
  import "./chunk-IA45XHOA.js";
19
18
  import "./chunk-SQM2BQ7H.js";
@@ -36,11 +35,9 @@ var ServeSessionRunner = class {
36
35
  this.config = config;
37
36
  this.callbacks = callbacks;
38
37
  this.connection = deps?.connection ?? new AgentConnection(config.connection);
39
- const portVisibility = new CodespacePortVisibility();
40
38
  this.portDiscovery = deps?.portDiscovery ?? new PortDiscovery({
41
39
  report: (ports) => this.connection.reportDiscoveredPorts(ports),
42
- annotate: (ports) => loadAndAnnotateDiscoveredPorts(config.workspaceDir, ports),
43
- onReported: (ports) => portVisibility.ensureVisible(ports.map(({ port }) => port))
40
+ annotate: (ports) => loadAndAnnotateDiscoveredPorts(config.workspaceDir, ports)
44
41
  });
45
42
  this.commandSupervisor = deps?.commandSupervisor ?? new WorkspaceCommandSupervisor({
46
43
  config: loadConveyorConfig(),
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@rallycry/conveyor-agent",
3
- "version": "11.0.44",
3
+ "version": "11.0.46",
4
4
  "description": "Conveyor Agent Runner v10 - PTY harness for the task chat (SDK harness for audit/project-chat). Agent-as-User architecture with BaseService patterns. Works locally too.",
5
5
  "keywords": [
6
6
  "agent",
7
7
  "claude",
8
- "codespace",
9
8
  "conveyor",
10
9
  "v10"
11
10
  ],
@@ -39,7 +38,7 @@
39
38
  },
40
39
  "dependencies": {
41
40
  "@anthropic-ai/claude-agent-sdk": "^0.3.284",
42
- "@modelcontextprotocol/sdk": "^1.30.1",
41
+ "@modelcontextprotocol/sdk": "^1.32.1",
43
42
  "node-pty": "^1.1.0",
44
43
  "socket.io-client": "^4.8.4",
45
44
  "tar": "^7.5.22",
@@ -71,7 +71,7 @@ mutation applied before the reply — is a stalled run, not a paused one.
71
71
  4. Skip, and list under "deliberately not touched":
72
72
  - rows with `parentTaskId` set — prune the pack parent; its children follow
73
73
  the parent's disposition;
74
- - rows with a non-null `codespaceStatus` — something is running on it;
74
+ - rows with a non-null `workspaceStatus` (`codespaceStatus` on older servers) — something is running on it;
75
75
  - rows with a `githubPRUrl` — work exists; that is a review question, not
76
76
  a prune question.
77
77
  5. `mcp__conveyor__list_tags` once — the project's vocabulary, and whether a