@rallycry/conveyor-agent 4.6.0 → 4.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.
|
@@ -498,6 +498,9 @@ import { existsSync } from "fs";
|
|
|
498
498
|
import { join } from "path";
|
|
499
499
|
var WORKTREE_DIR = ".worktrees";
|
|
500
500
|
function ensureWorktree(projectDir, taskId, branch) {
|
|
501
|
+
if (projectDir.includes(`/${WORKTREE_DIR}/`)) {
|
|
502
|
+
return projectDir;
|
|
503
|
+
}
|
|
501
504
|
const worktreePath = join(projectDir, WORKTREE_DIR, taskId);
|
|
502
505
|
if (existsSync(worktreePath)) {
|
|
503
506
|
if (branch) {
|
|
@@ -2075,11 +2078,11 @@ function getModeTools(agentMode, connection, config, context) {
|
|
|
2075
2078
|
return config.mode === "pm" ? buildPmTools(connection, context?.storyPoints, { includePackTools: false }) : buildTaskTools(connection);
|
|
2076
2079
|
}
|
|
2077
2080
|
}
|
|
2078
|
-
function createConveyorMcpServer(connection, config, context) {
|
|
2081
|
+
function createConveyorMcpServer(connection, config, context, agentMode) {
|
|
2079
2082
|
const commonTools = buildCommonTools(connection, config);
|
|
2080
|
-
const
|
|
2081
|
-
const modeTools = getModeTools(
|
|
2082
|
-
const discoveryTools =
|
|
2083
|
+
const effectiveMode = agentMode ?? context?.agentMode ?? void 0;
|
|
2084
|
+
const modeTools = getModeTools(effectiveMode, connection, config, context);
|
|
2085
|
+
const discoveryTools = effectiveMode === "discovery" || effectiveMode === "auto" ? buildDiscoveryTools(connection, context) : [];
|
|
2083
2086
|
return createSdkMcpServer({
|
|
2084
2087
|
name: "conveyor",
|
|
2085
2088
|
tools: [...commonTools, ...modeTools, ...discoveryTools]
|
|
@@ -2322,7 +2325,7 @@ function buildQueryOptions(host, context) {
|
|
|
2322
2325
|
allowDangerouslySkipPermissions: !needsCanUseTool,
|
|
2323
2326
|
canUseTool: buildCanUseTool(host),
|
|
2324
2327
|
tools: { type: "preset", preset: "claude_code" },
|
|
2325
|
-
mcpServers: { conveyor: createConveyorMcpServer(host.connection, host.config, context) },
|
|
2328
|
+
mcpServers: { conveyor: createConveyorMcpServer(host.connection, host.config, context, mode) },
|
|
2326
2329
|
hooks: buildHooks(host),
|
|
2327
2330
|
maxTurns: settings.maxTurns,
|
|
2328
2331
|
effort: settings.effort,
|
|
@@ -3043,7 +3046,7 @@ var AgentRunner = class {
|
|
|
3043
3046
|
return true;
|
|
3044
3047
|
}
|
|
3045
3048
|
tryPostContextWorktree() {
|
|
3046
|
-
if (process.env.CODESPACES !== "true" && !this.worktreeActive && this.taskContext?.useWorktree) {
|
|
3049
|
+
if (process.env.CODESPACES !== "true" && process.env.CONVEYOR_USE_WORKTREE !== "false" && !this.worktreeActive && this.taskContext?.useWorktree) {
|
|
3047
3050
|
this.activateWorktree("[conveyor] Using worktree (from task config):");
|
|
3048
3051
|
}
|
|
3049
3052
|
}
|
|
@@ -3773,4 +3776,4 @@ export {
|
|
|
3773
3776
|
ProjectRunner,
|
|
3774
3777
|
FileCache
|
|
3775
3778
|
};
|
|
3776
|
-
//# sourceMappingURL=chunk-
|
|
3779
|
+
//# sourceMappingURL=chunk-F4RQRSK6.js.map
|