@rallycry/conveyor-agent 7.1.1 → 7.1.3

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.
@@ -1,10 +1,8 @@
1
1
  import {
2
2
  createHarness,
3
+ createServiceLogger,
3
4
  defineTool
4
- } from "./chunk-KNBG2634.js";
5
- import {
6
- createServiceLogger
7
- } from "./chunk-CYZPFJGN.js";
5
+ } from "./chunk-U6AYNVS7.js";
8
6
 
9
7
  // src/connection/agent-connection.ts
10
8
  import { io } from "socket.io-client";
@@ -1985,7 +1983,7 @@ function buildReviewPrompt(context) {
1985
1983
  } else {
1986
1984
  parts.push(
1987
1985
  `### Code Review Process`,
1988
- `1. Run \`git diff <baseBranch>..HEAD\` to see all changes in this PR`,
1986
+ `1. Run \`git diff ${context?.baseBranch ?? "dev"}..HEAD\` to see all changes in this PR`,
1989
1987
  `2. Read the task plan to understand the intended changes`,
1990
1988
  `3. Explore the surrounding codebase to verify pattern consistency`,
1991
1989
  `4. Review against the criteria below`,
@@ -2502,16 +2500,16 @@ CRITICAL: You are in Auto mode. Do NOT report status, ask for confirmation, or g
2502
2500
  return [
2503
2501
  `You are the project manager for this task and its subtasks.`,
2504
2502
  `Review existing subtasks via \`list_subtasks\` and the chat history before taking action.`,
2505
- `Read the task description and chat history carefully \u2014 the team may have already provided context and requirements. Respond to what's been discussed rather than starting from scratch.`,
2506
- `The task details are provided above. Wait for the team to provide instructions before taking action.`,
2503
+ `Read the task description and chat history carefully \u2014 the team has provided the initial context below. Acknowledge what they've asked for and respond in chat before taking silent tool actions.`,
2504
+ `Start planning now \u2014 explore the codebase, ask clarifying questions if needed, and propose a subtask breakdown. Do not wait for additional team input before engaging.`,
2507
2505
  `When you finish planning, save the plan with update_task and end your turn. Your reply will be visible to the team in chat.`
2508
2506
  ];
2509
2507
  }
2510
2508
  if (isPm) {
2511
2509
  return [
2512
2510
  `You are the project manager for this task.`,
2513
- `Read the task description and chat history carefully \u2014 the team may have already provided context and requirements. Respond to what's been discussed rather than starting from scratch.`,
2514
- `The task details are provided above. Wait for the team to ask questions or provide additional requirements before starting to plan.`,
2511
+ `Read the task description and chat history carefully \u2014 the team has provided the initial context below. Acknowledge what they've asked for and respond in chat before taking silent tool actions.`,
2512
+ `Start planning now \u2014 explore the codebase, ask clarifying questions if needed, and draft a plan. Do not wait for additional team input before engaging; the initial message IS the team engaging.`,
2515
2513
  `When you finish planning, save the plan with update_task and end your turn. Your reply summarizing the plan will be visible in chat. A separate task agent will execute the plan after review.`
2516
2514
  ];
2517
2515
  }
@@ -5418,6 +5416,7 @@ async function handleExitPlanMode(host, input) {
5418
5416
  }
5419
5417
  if (host.agentMode === "discovery") {
5420
5418
  host.hasExitedPlanMode = true;
5419
+ host.pendingModeRestart = true;
5421
5420
  void host.connection.triggerIdentification();
5422
5421
  host.connection.postChatMessage(
5423
5422
  "Plan complete. Running identification \u2014 icon and agent assignment will be set automatically."
@@ -6116,7 +6115,6 @@ var SessionRunner = class _SessionRunner {
6116
6115
  stopped = false;
6117
6116
  hasCompleted = false;
6118
6117
  interrupted = false;
6119
- _isReviewing = false;
6120
6118
  taskContext = null;
6121
6119
  fullContext = null;
6122
6120
  queryBridge = null;
@@ -6238,9 +6236,6 @@ var SessionRunner = class _SessionRunner {
6238
6236
  if (!this.stopped && this.pendingMessages.length === 0) {
6239
6237
  await this.maybeSendPRNudge();
6240
6238
  }
6241
- if (!this.stopped && this.pendingMessages.length === 0) {
6242
- await this.maybeTransitionToReview();
6243
- }
6244
6239
  if (!this.stopped) {
6245
6240
  process.stderr.write(
6246
6241
  `[conveyor-agent] Listening for messages (mode: ${this.mode.effectiveMode})
@@ -6485,38 +6480,8 @@ var SessionRunner = class _SessionRunner {
6485
6480
  await this.refreshTaskContext();
6486
6481
  }
6487
6482
  }
6488
- // ── Same-box review transition ─────────────────────────────────
6489
- async maybeTransitionToReview() {
6490
- if (!this.config.isAuto || this._isReviewing) return;
6491
- await this.refreshTaskContext();
6492
- if (!this.taskContext?.githubPRUrl || this.taskContext.status !== "ReviewPR") return;
6493
- this._isReviewing = true;
6494
- try {
6495
- this.mode.handleModeChange("review");
6496
- process.stderr.write(
6497
- `[conveyor-agent] Auto-transitioning to review mode (same-box code review)
6498
- `
6499
- );
6500
- this.connection.sendEvent({
6501
- type: "mode_transition",
6502
- from: "building",
6503
- to: "review"
6504
- });
6505
- this.connection.emitModeChanged("review");
6506
- const reviewPrompt = [
6507
- `You have just created a PR for this task. Now perform a self-review of your changes.`,
6508
- `Run \`git diff ${this.fullContext?.baseBranch ?? "dev"}..HEAD\` to see all changes.`,
6509
- `Review the changes according to the review criteria in your instructions.`,
6510
- `If you find issues, fix them directly, commit, and push. Then approve the review.`,
6511
- `If everything looks good, approve the review using \`approve_code_review\`.`
6512
- ].join("\n");
6513
- await this.setState("running");
6514
- await this.executeQuery(reviewPrompt);
6515
- } finally {
6516
- this._isReviewing = false;
6517
- }
6518
- }
6519
6483
  // ── Context & bridge construction ────────────────────────────────
6484
+ // oxlint-disable-next-line complexity
6520
6485
  buildFullContext(ctx) {
6521
6486
  const chatHistory = mapChatHistory(ctx.chatHistory);
6522
6487
  return {
@@ -6543,7 +6508,8 @@ var SessionRunner = class _SessionRunner {
6543
6508
  projectTags: ctx.projectTags ?? void 0,
6544
6509
  taskTagIds: ctx.taskTagIds ?? void 0,
6545
6510
  projectObjectives: ctx.projectObjectives ?? void 0,
6546
- incidents: ctx.incidents ?? void 0
6511
+ incidents: ctx.incidents ?? void 0,
6512
+ agentSettings: ctx.agentSettings ?? null
6547
6513
  };
6548
6514
  }
6549
6515
  createQueryBridge() {
@@ -6594,6 +6560,9 @@ var SessionRunner = class _SessionRunner {
6594
6560
  this.connection.emitModeChanged(this.mode.effectiveMode);
6595
6561
  this.softStop();
6596
6562
  } else if (action.type === "restart_query") {
6563
+ if (this.fullContext && action.newMode === "review") {
6564
+ this.fullContext.claudeSessionId = null;
6565
+ }
6597
6566
  this.connection.emitModeChanged(action.newMode);
6598
6567
  this.softStop();
6599
6568
  }
@@ -7660,7 +7629,7 @@ var ProjectRunner = class {
7660
7629
  async handleAuditTags(request) {
7661
7630
  this.connection.emitStatus("busy");
7662
7631
  try {
7663
- const { handleTagAudit } = await import("./tag-audit-handler-PACJJEDB.js");
7632
+ const { handleTagAudit } = await import("./tag-audit-handler-BM6MMS5T.js");
7664
7633
  await handleTagAudit(request, this.connection, this.projectDir);
7665
7634
  } catch (error) {
7666
7635
  const msg = error instanceof Error ? error.message : String(error);
@@ -8082,4 +8051,4 @@ export {
8082
8051
  loadForwardPorts,
8083
8052
  loadConveyorConfig
8084
8053
  };
8085
- //# sourceMappingURL=chunk-23JCJ2GV.js.map
8054
+ //# sourceMappingURL=chunk-AZ6CRVYN.js.map