@rallycry/conveyor-agent 4.0.1 → 4.2.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.
@@ -693,48 +693,6 @@ function runStartCommand(cmd, cwd, onOutput) {
693
693
 
694
694
  // src/setup/codespace.ts
695
695
  import { execSync } from "child_process";
696
- var DEVCONTAINER_PATH2 = ".devcontainer/conveyor/devcontainer.json";
697
- function cleanDevcontainerFromGit(workspaceDir, taskBranch, baseBranch) {
698
- const git = (cmd) => execSync(cmd, { cwd: workspaceDir, encoding: "utf-8", timeout: 3e4 }).trim();
699
- try {
700
- git(`git fetch origin ${baseBranch}`);
701
- } catch {
702
- return { cleaned: false, message: `Failed to fetch origin/${baseBranch}` };
703
- }
704
- try {
705
- git(`git diff --quiet origin/${baseBranch} -- ${DEVCONTAINER_PATH2}`);
706
- return { cleaned: false, message: "devcontainer.json already matches base" };
707
- } catch {
708
- }
709
- try {
710
- const ahead = parseInt(git(`git rev-list --count origin/${baseBranch}..HEAD`), 10);
711
- if (ahead <= 1) {
712
- git(`git reset --hard origin/${baseBranch}`);
713
- } else {
714
- git(`git checkout origin/${baseBranch} -- ${DEVCONTAINER_PATH2}`);
715
- git(`git add ${DEVCONTAINER_PATH2}`);
716
- try {
717
- git(`git diff --cached --quiet -- ${DEVCONTAINER_PATH2}`);
718
- return { cleaned: false, message: "devcontainer.json already clean in working tree" };
719
- } catch {
720
- git(`git commit -m "chore: reset devcontainer config"`);
721
- }
722
- }
723
- try {
724
- git(`git push --force-with-lease origin ${taskBranch}`);
725
- } catch {
726
- git(`git push --force origin ${taskBranch}`);
727
- }
728
- return { cleaned: true, message: "devcontainer.json cleaned from git history" };
729
- } catch (err) {
730
- try {
731
- git(`git checkout ${taskBranch}`);
732
- } catch {
733
- }
734
- const msg = err instanceof Error ? err.message : "Unknown error";
735
- return { cleaned: false, message: `Git cleanup failed: ${msg}` };
736
- }
737
- }
738
696
  function initRtk() {
739
697
  try {
740
698
  execSync("rtk --version", { stdio: "ignore" });
@@ -1261,7 +1219,12 @@ function buildModePrompt(agentMode, context) {
1261
1219
  `- You can create and manage subtasks`,
1262
1220
  `- You cannot write code or edit files (except .claude/plans/)`,
1263
1221
  `- Goal: collaborate with the user to create a clear plan`,
1264
- `- Proactively fill task properties (SP, tags, icon) as the plan takes shape`
1222
+ `- Proactively fill task properties (SP, tags, icon) as the plan takes shape`,
1223
+ ``,
1224
+ `### Self-Update vs Subtasks`,
1225
+ `- If the work fits in a single task (1-3 SP), update YOUR OWN plan and properties \u2014 do not create subtasks`,
1226
+ `- Only create subtasks when the work genuinely requires multiple independent pieces (e.g., Pack-tier work, 8+ SP)`,
1227
+ `- When planning for yourself: use update_task to save the plan, then set_story_points, set_task_title, set_task_icon`
1265
1228
  ];
1266
1229
  if (context) {
1267
1230
  parts.push(...buildPropertyInstructions(context));
@@ -2111,7 +2074,10 @@ function createConveyorMcpServer(connection, config, context) {
2111
2074
  let modeTools;
2112
2075
  switch (agentMode) {
2113
2076
  case "building":
2114
- modeTools = buildTaskTools(connection);
2077
+ modeTools = context?.isParentTask ? [
2078
+ ...buildTaskTools(connection),
2079
+ ...buildPmTools(connection, context?.storyPoints, { includePackTools: true })
2080
+ ] : buildTaskTools(connection);
2115
2081
  break;
2116
2082
  case "review":
2117
2083
  modeTools = buildPmTools(connection, context?.storyPoints, {
@@ -2125,7 +2091,9 @@ function createConveyorMcpServer(connection, config, context) {
2125
2091
  break;
2126
2092
  case "discovery":
2127
2093
  case "help":
2128
- modeTools = buildPmTools(connection, context?.storyPoints, { includePackTools: false });
2094
+ modeTools = buildPmTools(connection, context?.storyPoints, {
2095
+ includePackTools: !!context?.isParentTask
2096
+ });
2129
2097
  break;
2130
2098
  default:
2131
2099
  modeTools = config.mode === "pm" ? buildPmTools(connection, context?.storyPoints, { includePackTools: false }) : buildTaskTools(connection);
@@ -2794,16 +2762,6 @@ var AgentRunner = class _AgentRunner {
2794
2762
  if (process.env.CODESPACES === "true") {
2795
2763
  unshallowRepo(this.config.workspaceDir);
2796
2764
  }
2797
- if (process.env.CODESPACES === "true" && this.taskContext.baseBranch) {
2798
- const result = cleanDevcontainerFromGit(
2799
- this.config.workspaceDir,
2800
- this.taskContext.githubBranch,
2801
- this.taskContext.baseBranch
2802
- );
2803
- if (result.cleaned) {
2804
- this.setupLog.push(`[conveyor] ${result.message}`);
2805
- }
2806
- }
2807
2765
  if (process.env.CODESPACES !== "true" && !this.worktreeActive && this.taskContext.useWorktree) {
2808
2766
  try {
2809
2767
  const worktreePath = ensureWorktree(this.config.workspaceDir, this.config.taskId);
@@ -3657,4 +3615,4 @@ export {
3657
3615
  ProjectRunner,
3658
3616
  FileCache
3659
3617
  };
3660
- //# sourceMappingURL=chunk-Q2LN2YBW.js.map
3618
+ //# sourceMappingURL=chunk-WSXJ4F37.js.map