@rallycry/conveyor-agent 10.6.1 → 10.7.0

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/index.d.ts CHANGED
@@ -424,13 +424,6 @@ declare class SessionRunner {
424
424
  private queryBridge;
425
425
  private inputResolver;
426
426
  private pendingMessages;
427
- private prNudgeCount;
428
- /** Set when the agent posts a substantive message to the task chat (the
429
- * `post_to_chat` tool) during the current turn; reset at the start of every
430
- * query. Read by the stuck-detection: an auto agent that finished without a
431
- * PR but DID explain itself / ask for help in chat is waiting on a human,
432
- * not silently stuck, so it is left attached rather than nudged. */
433
- private agentSpokeThisTurn;
434
427
  /** Guards overlapping runs of the periodic git flush. */
435
428
  private periodicFlushInFlight;
436
429
  /** Consecutive flush ticks skipped because a heavy gate was running. */
@@ -537,43 +530,6 @@ declare class SessionRunner {
537
530
  flushGitOnShutdown(): Promise<void>;
538
531
  stop(): void;
539
532
  softStop(): void;
540
- private static readonly MAX_STUCK_NUDGES;
541
- /** The build-phase nudge (In Progress, no PR). Offers BOTH escape routes so
542
- * the agent never just goes idle. */
543
- private static readonly STUCK_PROMPT;
544
- /** The pre-build nudge (still Planning/Open, identification/plan unfinished).
545
- * Same two-escape-route shape, aimed at landing the plan + continuing to build. */
546
- private static readonly STUCK_PROMPT_PLANNING;
547
- /**
548
- * Classify how an auto task is "stuck" after its turn ended (call sites run
549
- * post-turn, so the TUI is no longer working), or null if it isn't. Shared
550
- * guards: only auto, not rate-limited, under the nudge cap, and the agent
551
- * stayed silent this turn — if it posted to chat (explained itself / asked for
552
- * help) it's waiting on a human, not silently stuck.
553
- *
554
- * - "pr": In Progress with no open PR (build finished without shipping).
555
- * - "planning": still in a pre-build status (Planning/Open) without
556
- * (identified + saved plan) — e.g. the server-side InProgress bump failed
557
- * and the agent idled before documenting its plan. An agent that idles
558
- * here would otherwise clean-exit → its session Ends → the workspace is
559
- * reaped "agent_gone" before a plan ever landed. Nudging (and, on
560
- * exhaustion, going dormant) keeps the session Active so the pod is never
561
- * prematurely slept.
562
- */
563
- private autoStuckKind;
564
- private isAutoStuck;
565
- /**
566
- * Stop driving the agent and route the core loop into dormant idle —
567
- * connected and attachable, but NOT running (so no tokens are spent while it
568
- * waits). A human reply (chat or TUI keystroke after the next wake) resumes
569
- * it. This replaces the old hard `stop()`: the auto agent must never kill its
570
- * own session, so a person can always take over.
571
- */
572
- private enterDormantForHumanTakeover;
573
- private refreshTaskContext;
574
- /** Prompt + chat-message label for a stuck-nudge of the given kind. */
575
- private stuckNudgeContent;
576
- private maybeHandleStuckAuto;
577
533
  private buildFullContext;
578
534
  private createQueryBridge;
579
535
  private wireConnectionCallbacks;
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  unshallowRepo,
21
21
  updateRemoteToken,
22
22
  uploadSnapshotToGcs
23
- } from "./chunk-5ELLQUP4.js";
23
+ } from "./chunk-TIEFSYIY.js";
24
24
  import "./chunk-7TQO4ZF4.js";
25
25
 
26
26
  // src/runner/worktree.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rallycry/conveyor-agent",
3
- "version": "10.6.1",
3
+ "version": "10.7.0",
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",
@@ -337,15 +337,34 @@ if [ -n "${CONVEYOR_USER_ID}" ] && [ -n "${USER_HOME_PROJECT_ID}" ] && [ -d "${U
337
337
  USER_HOME_ROOT="${USER_HOME_MOUNT}/users/${CONVEYOR_USER_ID}/${USER_HOME_PROJECT_ID}"
338
338
  echo "[pool] Linking Claude state to ${USER_HOME_ROOT}"
339
339
  mkdir -p "${USER_HOME_ROOT}/.claude" "${USER_HOME_ROOT}/.config/claude" 2>/dev/null || true
340
- seed_claude_json "${USER_HOME_ROOT}/.claude.json"
341
340
 
342
- # Replace any image defaults with live symlinks into the mount.
343
- rm -rf /home/conveyor/.claude /home/conveyor/.claude.json /home/conveyor/.config/claude 2>/dev/null || true
341
+ # Replace any image defaults with live symlinks into the mount for the SHARED,
342
+ # append-mostly Claude state: transcripts/plans/memory under ~/.claude and
343
+ # ~/.config/claude. These persist across every pod the user runs, and --resume
344
+ # + session history depend on them (see claude-session-persistence.md).
345
+ #
346
+ # ~/.claude.json is deliberately NOT symlinked — it is POD-LOCAL (below). The
347
+ # Claude CLI rewrites that file wholesale at startup and during runs, so a
348
+ # burst of concurrent pods for the same user+project (seen live 2026-07-12: 7
349
+ # pods in 10 minutes) racing one shared file produces last-writer-wins lost
350
+ # updates — the true root cause behind the read-back mismatch that parked a
351
+ # TUI at a startup dialog, and the vector that let one poisoned
352
+ # customApiKeyResponses write brick every future pod. Nothing load-bearing
353
+ # lives only in ~/.claude.json: credentials are in ~/.claude/.credentials.json
354
+ # (still shared, re-synthesized per boot) and transcripts in ~/.claude/projects.
355
+ # The agent's ensureClaudeOnboarding + the seed below rebuild every first-run
356
+ # gate this file needs, fresh, on each boot.
357
+ rm -rf /home/conveyor/.claude /home/conveyor/.config/claude 2>/dev/null || true
344
358
  mkdir -p /home/conveyor/.config 2>/dev/null || true
345
359
  ln -sfn "${USER_HOME_ROOT}/.claude" /home/conveyor/.claude
346
- ln -sfn "${USER_HOME_ROOT}/.claude.json" /home/conveyor/.claude.json
347
360
  ln -sfn "${USER_HOME_ROOT}/.config/claude" /home/conveyor/.config/claude
348
361
 
362
+ # Pod-local ~/.claude.json: clear any symlink/file a prior boot or the image
363
+ # baked in, then seed a fresh real file on the pod's OWN disk (local
364
+ # read-after-write is consistent, so no cross-pod race and no read-back skew).
365
+ rm -rf /home/conveyor/.claude.json 2>/dev/null || true
366
+ seed_claude_json /home/conveyor/.claude.json
367
+
349
368
  # OpenCode state (sessions + config) persists the same way as ~/.claude.
350
369
  mkdir -p "${USER_HOME_ROOT}/.local/share/opencode" "${USER_HOME_ROOT}/.config/opencode" 2>/dev/null || true
351
370
  rm -rf /home/conveyor/.local/share/opencode /home/conveyor/.config/opencode 2>/dev/null || true