@rallycry/conveyor-agent 11.0.24 → 11.0.26

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.
@@ -91,7 +91,7 @@ import {
91
91
  statWorkspacePath,
92
92
  updateRemoteToken,
93
93
  verifyGitCredential
94
- } from "./chunk-YNI2HFZE.js";
94
+ } from "./chunk-BZZ4B37Q.js";
95
95
  import {
96
96
  registerBootMilestoneSocketFallback,
97
97
  reportBootMilestone
@@ -4912,6 +4912,9 @@ var CodexTuiAdapter = class {
4912
4912
  }
4913
4913
  const config = {
4914
4914
  cli_auth_credentials_store: "file",
4915
+ // The pod image owns CLI upgrades. An interactive update would try to
4916
+ // replace the root-owned global package from the conveyor user account.
4917
+ check_for_update_on_startup: false,
4915
4918
  sqlite_home: codexSqliteHome(this.env),
4916
4919
  approval_policy: "never",
4917
4920
  // Always full access, plan mode included. Codex's own read-only mode is
@@ -5309,7 +5312,16 @@ function wrapBridgeWithDirectStream(inner, reporter, options = {}) {
5309
5312
 
5310
5313
  // src/execution/query-executor.ts
5311
5314
  import { createHash as createHash4, randomUUID as randomUUID2 } from "crypto";
5312
- import { existsSync, readFileSync as readFileSync3, renameSync as renameSync2, truncateSync } from "fs";
5315
+ import {
5316
+ closeSync,
5317
+ existsSync,
5318
+ openSync,
5319
+ readFileSync as readFileSync3,
5320
+ readSync,
5321
+ renameSync as renameSync2,
5322
+ statSync as statSync2,
5323
+ truncateSync
5324
+ } from "fs";
5313
5325
 
5314
5326
  // src/execution/chat-instructions.ts
5315
5327
  function buildChatInstructions(context, scenario, newMessages) {
@@ -12322,7 +12334,15 @@ function hasExistingSessionFile(taskId, cwd, lineage) {
12322
12334
  if (process.env.CONVEYOR_TUI === "codex") {
12323
12335
  return !!readCodexLineage(taskIdToSessionUuid(key), cwd);
12324
12336
  }
12325
- return sessionFileExists(taskIdToSessionUuid(key), cwd);
12337
+ const uuid = taskIdToSessionUuid(key);
12338
+ return sessionFileExists(uuid, cwd) && isResumableTranscript(sessionTranscriptPath(cwd, uuid));
12339
+ }
12340
+ var spawnedTranscripts = /* @__PURE__ */ new Set();
12341
+ function markSpawnedTranscript(cwd, sessionUuid) {
12342
+ spawnedTranscripts.add(sessionTranscriptPath(cwd, sessionUuid));
12343
+ }
12344
+ function isResumableTranscript(path) {
12345
+ return spawnedTranscripts.has(path) || transcriptHasConversation(path);
12326
12346
  }
12327
12347
  function resolveSessionStart(lineageKey, cwd, tui = process.env.CONVEYOR_TUI) {
12328
12348
  const sessionUuid = taskIdToSessionUuid(lineageKey);
@@ -12331,11 +12351,46 @@ function resolveSessionStart(lineageKey, cwd, tui = process.env.CONVEYOR_TUI) {
12331
12351
  return { sessionId: sessionUuid, ...resume ? { resume } : {} };
12332
12352
  }
12333
12353
  if (sessionFileExists(sessionUuid, cwd)) {
12334
- repairTornSessionFile(sessionTranscriptPath(cwd, sessionUuid));
12335
- return { resume: sessionUuid };
12354
+ const path = sessionTranscriptPath(cwd, sessionUuid);
12355
+ repairTornSessionFile(path);
12356
+ if (isResumableTranscript(path)) return { resume: sessionUuid };
12357
+ rotateSessionFile(cwd, sessionUuid);
12358
+ logger5.warn("Rotated a transcript with no conversation aside before resume", { path });
12336
12359
  }
12360
+ markSpawnedTranscript(cwd, sessionUuid);
12337
12361
  return { sessionId: sessionUuid };
12338
12362
  }
12363
+ var CONVERSATION_PROBE_BYTES = 256 * 1024;
12364
+ function transcriptHasConversation(path) {
12365
+ let fd;
12366
+ try {
12367
+ const size = statSync2(path).size;
12368
+ const length = Math.min(size, CONVERSATION_PROBE_BYTES);
12369
+ const buffer = Buffer.alloc(length);
12370
+ fd = openSync(path, "r");
12371
+ const read = readSync(fd, buffer, 0, length, 0);
12372
+ const text = buffer.subarray(0, read).toString("utf8");
12373
+ const complete = text.slice(0, text.lastIndexOf("\n") + 1);
12374
+ for (const line of complete.split("\n")) {
12375
+ if (!line.trim()) continue;
12376
+ try {
12377
+ const type = JSON.parse(line).type;
12378
+ if (type === "user" || type === "assistant") return true;
12379
+ } catch {
12380
+ }
12381
+ }
12382
+ return size > CONVERSATION_PROBE_BYTES;
12383
+ } catch {
12384
+ return true;
12385
+ } finally {
12386
+ if (fd !== void 0) {
12387
+ try {
12388
+ closeSync(fd);
12389
+ } catch {
12390
+ }
12391
+ }
12392
+ }
12393
+ }
12339
12394
  function repairTornSessionFile(path) {
12340
12395
  try {
12341
12396
  if (!existsSync(path)) return false;
@@ -12864,6 +12919,7 @@ function freshSessionOptions(host, context, options) {
12864
12919
  sessionLineageKey(context.taskId, host.agentMode, host.config.mode)
12865
12920
  );
12866
12921
  if (rotateSessionFile(host.config.workspaceDir, lineageUuid)) {
12922
+ markSpawnedTranscript(host.config.workspaceDir, lineageUuid);
12867
12923
  return { ...options, sessionId: lineageUuid };
12868
12924
  }
12869
12925
  return { ...options, sessionId: randomUUID2() };
@@ -12915,6 +12971,11 @@ async function handleAuthError(context, host, options) {
12915
12971
  async function handleStaleSession(context, host, options) {
12916
12972
  context.claudeSessionId = null;
12917
12973
  host.connection.storeSessionId("");
12974
+ logger5.warn("Resume target had no resumable conversation; rotating it aside and starting fresh", {
12975
+ taskId: context.taskId,
12976
+ runnerMode: host.config.mode,
12977
+ agentMode: host.agentMode
12978
+ });
12918
12979
  const freshPrompt = buildMultimodalPrompt(
12919
12980
  await buildInitialPrompt(host.config.mode, context, host.isAuto, host.agentMode),
12920
12981
  context,
@@ -13022,7 +13083,7 @@ async function handleUsageCapRejection(context, host, options, rateLimitType, re
13022
13083
  return runWithRetry(freshQuery, context, host, options);
13023
13084
  }
13024
13085
  function handleRetryError(error, context, host, options, prevImageError) {
13025
- if (isStaleOrExitedSession(error, context) && context.claudeSessionId) {
13086
+ if (isStaleOrExitedSession(error, context)) {
13026
13087
  return handleStaleSession(context, host, options);
13027
13088
  }
13028
13089
  if (isAuthError(getErrorMessage(error))) {
@@ -13048,7 +13109,7 @@ function handleProcessResult(result, context, host, options) {
13048
13109
  )
13049
13110
  };
13050
13111
  }
13051
- if (result.staleSession && context.claudeSessionId) {
13112
+ if (result.staleSession) {
13052
13113
  return {
13053
13114
  action: "return_promise",
13054
13115
  promise: handleStaleSession(context, host, options)
@@ -8,7 +8,7 @@ import {
8
8
  readWorkspaceBytes,
9
9
  statWorkspacePath,
10
10
  workspacePathExists
11
- } from "./chunk-YNI2HFZE.js";
11
+ } from "./chunk-BZZ4B37Q.js";
12
12
  import {
13
13
  reportBootMilestone
14
14
  } from "./chunk-Q4FQOJ7D.js";
@@ -1446,14 +1446,14 @@ ${q.question}${q.options.length ? "\n" + q.options.map((o) => `- ${o.label}: ${o
1446
1446
  }
1447
1447
  };
1448
1448
 
1449
- // ../shared/dist/chunk-6NPOGQPP.js
1449
+ // ../shared/dist/chunk-U3HGG5NX.js
1450
1450
  import { z } from "zod";
1451
1451
  var DEFAULT_SONNET_MODEL = "claude-sonnet-5";
1452
- var DEFAULT_OPUS_MODEL = "claude-opus-5";
1452
+ var DEFAULT_OPUS_MODEL = "claude-opus-5-5";
1453
1453
  var DEFAULT_HAIKU_MODEL = "claude-haiku-4-5-20251001";
1454
1454
  var FABLE_MODEL = "claude-fable-5-1";
1455
1455
  var PREVIOUS_SONNET_MODEL = "claude-sonnet-4-6";
1456
- var PREVIOUS_OPUS_MODEL = "claude-opus-4-8";
1456
+ var PREVIOUS_OPUS_MODEL = "claude-opus-5";
1457
1457
  var PTY_STREAM_PORT_BASE = 7420;
1458
1458
  var PTY_STREAM_PORT_ATTEMPTS = 8;
1459
1459
  function encodePtyStreamFrame(frame) {
@@ -3307,6 +3307,10 @@ var CancelDecisionRequestSchema = z10.object({
3307
3307
  /** Why it is being dropped. Posted to the decision thread. */
3308
3308
  reason: z10.string().max(DECISION_RESOLUTION_MAX).optional()
3309
3309
  });
3310
+ var BulkDecisionIdsRequestSchema = z10.object({
3311
+ projectId: z10.string().cuid("Invalid project ID"),
3312
+ decisionIds: z10.array(z10.string().cuid()).min(1).max(200)
3313
+ });
3310
3314
  var ReopenDecisionRequestSchema = z10.object({
3311
3315
  decisionId: decisionIdSchema,
3312
3316
  deadlineHours: z10.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional()
@@ -3572,8 +3576,8 @@ function anthropicEntry(model, label, inputPerMillion, outputPerMillion, opts =
3572
3576
  };
3573
3577
  }
3574
3578
  var ANTHROPIC_CATALOG = [
3575
- anthropicEntry(DEFAULT_OPUS_MODEL, "Opus 5 Latest", 5, 25),
3576
- anthropicEntry(PREVIOUS_OPUS_MODEL, "Opus 4.8", 5, 25),
3579
+ anthropicEntry(DEFAULT_OPUS_MODEL, "Opus 5.5 Latest", 4, 20),
3580
+ anthropicEntry(PREVIOUS_OPUS_MODEL, "Opus 5", 5, 25),
3577
3581
  anthropicEntry(DEFAULT_SONNET_MODEL, "Sonnet 5 Latest", 3, 15),
3578
3582
  anthropicEntry(PREVIOUS_SONNET_MODEL, "Sonnet 4.6", 3, 15),
3579
3583
  // The Haiku line (4.5 and older) predates the tuning surface and 400s on it.
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  WorkspaceCommandSupervisor,
8
8
  startWorkspaceCommandsAfterConnect,
9
9
  stopWorkspaceCommands
10
- } from "./chunk-IWWBG5FI.js";
10
+ } from "./chunk-7WO6NTOS.js";
11
11
  import {
12
12
  PtyHarness,
13
13
  SessionRunner,
@@ -25,7 +25,7 @@ import {
25
25
  runUsageProbe,
26
26
  sampleKeyUsage,
27
27
  usesNativeUsageReporting
28
- } from "./chunk-HW6SHIL7.js";
28
+ } from "./chunk-4L22UNZD.js";
29
29
  import "./chunk-37J5MMQT.js";
30
30
  import {
31
31
  inheritedEnv,
@@ -44,7 +44,7 @@ import {
44
44
  createServiceLogger,
45
45
  fetchBootstrap,
46
46
  loadConveyorConfig
47
- } from "./chunk-YNI2HFZE.js";
47
+ } from "./chunk-BZZ4B37Q.js";
48
48
  import "./chunk-Q4FQOJ7D.js";
49
49
  import "./chunk-W4LZ7R6Z.js";
50
50
  import "./chunk-372R6E4C.js";
@@ -1458,7 +1458,7 @@ if (!RUNNER_MODES.includes(CONVEYOR_MODE)) {
1458
1458
  process.exit(1);
1459
1459
  }
1460
1460
  if (CONVEYOR_MODE === "serving") {
1461
- const { runServingSession } = await import("./serve-boot-THPACDVI.js");
1461
+ const { runServingSession } = await import("./serve-boot-T7MNWASE.js");
1462
1462
  exitContext.runnerMode = "serving";
1463
1463
  exitContext.sessionId = process.env.CONVEYOR_SESSION_ID ?? exitContext.sessionId;
1464
1464
  const outcome = await runServingSession({
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SessionRunner,
3
3
  unshallowRepo
4
- } from "./chunk-HW6SHIL7.js";
4
+ } from "./chunk-4L22UNZD.js";
5
5
  import "./chunk-37J5MMQT.js";
6
6
  import "./chunk-WCJ6HRVU.js";
7
7
  import {
@@ -17,7 +17,7 @@ import {
17
17
  stageAndCommit,
18
18
  updateRemoteToken,
19
19
  workspacePathExists
20
- } from "./chunk-YNI2HFZE.js";
20
+ } from "./chunk-BZZ4B37Q.js";
21
21
  import "./chunk-Q4FQOJ7D.js";
22
22
  import {
23
23
  runAuthTokenCommand,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  WorkspaceCommandSupervisor
3
- } from "./chunk-IWWBG5FI.js";
3
+ } from "./chunk-7WO6NTOS.js";
4
4
  import {
5
5
  AgentConnection,
6
6
  CodespacePortVisibility,
@@ -11,7 +11,7 @@ import {
11
11
  createServiceLogger,
12
12
  ensureOnTaskBranch,
13
13
  loadConveyorConfig
14
- } from "./chunk-YNI2HFZE.js";
14
+ } from "./chunk-BZZ4B37Q.js";
15
15
  import "./chunk-Q4FQOJ7D.js";
16
16
  import "./chunk-W4LZ7R6Z.js";
17
17
  import "./chunk-IA45XHOA.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rallycry/conveyor-agent",
3
- "version": "11.0.24",
3
+ "version": "11.0.26",
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",
@@ -38,7 +38,7 @@
38
38
  "typecheck": "tsgo --noEmit"
39
39
  },
40
40
  "dependencies": {
41
- "@anthropic-ai/claude-agent-sdk": "^0.3.257",
41
+ "@anthropic-ai/claude-agent-sdk": "^0.3.280",
42
42
  "@modelcontextprotocol/sdk": "^1.30.0",
43
43
  "node-pty": "^1.0.0",
44
44
  "socket.io-client": "^4.8.3",
@@ -49,6 +49,6 @@
49
49
  "@project/shared": "workspace:*",
50
50
  "tsup": "^8.0.0",
51
51
  "typescript": "^5.3.0",
52
- "vitest": "^4.0.17"
52
+ "vitest": "^5.0.1"
53
53
  }
54
54
  }