@rallycry/conveyor-agent 10.2.5 → 10.3.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
@@ -282,23 +282,24 @@ declare class ModeController {
282
282
  /** Resolve the initial mode based on task context */
283
283
  resolveInitialMode(context: ModeTaskContext): AgentMode;
284
284
  /**
285
- * A FRESH auto task runs the read-only plan turn first (`--permission-mode plan`):
286
- * resolveInitialMode leaves it in `auto` with `_hasExitedPlanMode = false`, and
287
- * once the agent finishes it calls ExitPlanMode → building. Only tasks that have
288
- * already progressed past the fresh stage bypass planning and build immediately
289
- * with `--dangerously-skip-permissions`:
285
+ * An auto task that still NEEDS PLANNING (no plan saved, pre-build status, no
286
+ * PR see `taskNeedsPlanning` in @project/shared) runs the read-only plan turn
287
+ * first (`--permission-mode plan`): resolveInitialMode leaves it in `auto` with
288
+ * `_hasExitedPlanMode = false`, and once the agent finishes it calls
289
+ * ExitPlanMode → building. Everything else bypasses planning and builds
290
+ * immediately with `--dangerously-skip-permissions`:
290
291
  *
291
- * - a build already underway (status past `Planning`/`Open`),
292
- * - a PR already open (safety net if status lags),
293
- * - a release (booted `InProgress`), or
294
- * - a pod restart mid-build (DB `agentMode` stays `"auto"` but status advanced).
292
+ * - a plan already on the card (e.g. a Planning card planned by a human/PM),
293
+ * - a build already underway (status past `Planning`/`Open` releases booted
294
+ * `InProgress`, pod restarts mid-build where DB `agentMode` stays `"auto"`),
295
+ * - a PR already open (safety net if status lags).
295
296
  *
296
297
  * Runtime Build-after-Discovery never reaches this gate as `auto` — the server's
297
- * `resolveModeToSend` rewrites it to `"building"` for any non-`Planning` task.
298
+ * `resolveModeToSend` rewrites it to `"building"` for any task with a plan.
298
299
  */
299
300
  canBypassPlanning(context: ModeTaskContext): boolean;
300
301
  /** Handle mode change from server */
301
- handleModeChange(newMode: AgentMode): ModeAction;
302
+ handleModeChange(newMode: AgentMode, context?: ModeTaskContext | null): ModeAction;
302
303
  /** Handle ExitPlanMode call from the agent */
303
304
  handleExitPlanMode(context: ModeTaskContext): ModeAction;
304
305
  /** Check if pack runner behavior should be used */
@@ -537,11 +538,12 @@ declare class SessionRunner {
537
538
  * help) it's waiting on a human, not silently stuck.
538
539
  *
539
540
  * - "pr": In Progress with no open PR (build finished without shipping).
540
- * - "planning": still Planning without (identified + saved plan). A fresh auto
541
- * agent that finishes its plan turn WITHOUT ExitPlanMode would otherwise idle
542
- * → clean-exit → its session Ends → the workspace is reaped "agent_gone"
543
- * before a plan ever landed. Nudging (and, on exhaustion, going dormant)
544
- * keeps the session Active so the pod is never prematurely slept.
541
+ * - "planning": still in a pre-build status (Planning/Open) without
542
+ * (identified + saved plan). A fresh auto agent that finishes its plan turn
543
+ * WITHOUT ExitPlanMode would otherwise idle → clean-exit → its session Ends
544
+ * → the workspace is reaped "agent_gone" before a plan ever landed. Nudging
545
+ * (and, on exhaustion, going dormant) keeps the session Active so the pod
546
+ * is never prematurely slept.
545
547
  */
546
548
  private autoStuckKind;
547
549
  private isAutoStuck;
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  unshallowRepo,
21
21
  updateRemoteToken,
22
22
  uploadSnapshotToGcs
23
- } from "./chunk-CFELRV35.js";
23
+ } from "./chunk-AMPYOJJC.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.2.5",
3
+ "version": "10.3.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",
@@ -217,10 +217,16 @@ if [ "${SESSION_MODE}" = "review" ]; then
217
217
  # branch), so a role check can't identify them — gating on role=reader here
218
218
  # is what let review pods fall through to the default task runner and boot
219
219
  # the parent's task agent in discovery mode. The agent CLI's RunnerMode is
220
- # spelled "code-review" (cli.ts validates task|pm|code-review|adhoc); the bare
220
+ # spelled "code-review" (cli.ts validates task|pm|code-review|adhoc|pack); the bare
221
221
  # "review" is the agentMode/tag axis, NOT a runner mode — passing it here
222
222
  # made the agent exit "Invalid CONVEYOR_MODE" and crash-loop every 10s.
223
223
  export CONVEYOR_MODE="code-review"
224
+ elif [ "${SESSION_MODE}" = "pack" ]; then
225
+ # Parent-card orchestrator (task-bound — CONVEYOR_TASK_ID is set): the agent
226
+ # runs the autonomous pack loop (start ready children, merge child PRs,
227
+ # complete the parent) instead of building code. Same task-mode lifecycle,
228
+ # different prompt/tool surface — see conveyor-agent pack-runner-prompt.ts.
229
+ export CONVEYOR_MODE="pack"
224
230
  elif [ "${SESSION_MODE}" = "adhoc" ]; then
225
231
  # Task-less USER SCRATCH pod (Sessions view): the agent runs an interactive
226
232
  # `claude` TUI relayed to the web terminal — no autonomous loop, no task. Must