@corbat-tech/coco 2.38.0 → 2.39.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.
@@ -3891,6 +3891,31 @@ var gitSimpleTools = [checkProtectedBranchTool, simpleAutoCommitTool];
3891
3891
 
3892
3892
  // src/cli/repl/agents/manager.ts
3893
3893
  init_logger();
3894
+ var LEGACY_ROLE_MAPPINGS = [
3895
+ { legacy: "explore", role: "researcher", reason: "read-only codebase exploration" },
3896
+ { legacy: "researcher", role: "researcher", reason: "legacy executor role" },
3897
+ { legacy: "plan", role: "planner", reason: "task planning" },
3898
+ { legacy: "planner", role: "planner", reason: "legacy executor role" },
3899
+ { legacy: "architect", role: "architect", reason: "architecture design" },
3900
+ { legacy: "editor", role: "editor", reason: "implementation edits" },
3901
+ { legacy: "debug", role: "coder", reason: "debugging maps to coding capability" },
3902
+ { legacy: "coder", role: "coder", reason: "legacy executor role" },
3903
+ { legacy: "test", role: "tester", reason: "test authoring/execution" },
3904
+ { legacy: "tester", role: "tester", reason: "legacy executor role" },
3905
+ { legacy: "tdd", role: "tester", reason: "test-first implementation" },
3906
+ { legacy: "e2e", role: "tester", reason: "end-to-end testing" },
3907
+ { legacy: "review", role: "reviewer", reason: "code review" },
3908
+ { legacy: "reviewer", role: "reviewer", reason: "legacy executor role" },
3909
+ { legacy: "refactor", role: "optimizer", reason: "structure optimization" },
3910
+ { legacy: "optimizer", role: "optimizer", reason: "legacy executor role" },
3911
+ { legacy: "security", role: "security", reason: "security analysis" },
3912
+ { legacy: "qa", role: "qa", reason: "quality assurance" },
3913
+ { legacy: "integrator", role: "integrator", reason: "integration coordination" },
3914
+ { legacy: "pm", role: "pm", reason: "product/project coordination" },
3915
+ { legacy: "docs", role: "docs", reason: "documentation" },
3916
+ { legacy: "database", role: "database", reason: "database work" }
3917
+ ];
3918
+ new Map(LEGACY_ROLE_MAPPINGS.map((mapping) => [mapping.legacy, mapping]));
3894
3919
  var AGENT_NAMES = {
3895
3920
  explore: "Explorer",
3896
3921
  plan: "Planner",
@@ -3950,7 +3975,7 @@ var AGENT_TYPES = [
3950
3975
  "docs",
3951
3976
  "database"
3952
3977
  ];
3953
- var LEGACY_ROLE_MAP = {
3978
+ var LEGACY_ROLE_MAP2 = {
3954
3979
  researcher: "explore",
3955
3980
  coder: "debug",
3956
3981
  // "debug" has write + bash + read — closest to general coding
@@ -3970,7 +3995,7 @@ var SpawnSimpleAgentSchema = z.object({
3970
3995
  });
3971
3996
  function resolveAgentType(input) {
3972
3997
  if (input.type) return input.type;
3973
- if (input.role && input.role in LEGACY_ROLE_MAP) return LEGACY_ROLE_MAP[input.role];
3998
+ if (input.role && input.role in LEGACY_ROLE_MAP2) return LEGACY_ROLE_MAP2[input.role];
3974
3999
  return "explore";
3975
4000
  }
3976
4001
  var spawnSimpleAgentTool = defineTool({