@rallycry/conveyor-agent 7.2.4 → 7.2.6
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/{chunk-AS3FYEBJ.js → chunk-MFHMYUND.js} +44 -24
- package/dist/chunk-MFHMYUND.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/task-audit-handler-6TZRN3YB.js +885 -0
- package/dist/task-audit-handler-6TZRN3YB.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-AS3FYEBJ.js.map +0 -1
- package/dist/task-audit-handler-LH35J3TX.js +0 -477
- package/dist/task-audit-handler-LH35J3TX.js.map +0 -1
|
@@ -470,6 +470,9 @@ var ModeController = class {
|
|
|
470
470
|
get mode() {
|
|
471
471
|
return this._mode;
|
|
472
472
|
}
|
|
473
|
+
get isAuto() {
|
|
474
|
+
return this._isAuto;
|
|
475
|
+
}
|
|
473
476
|
get hasExitedPlanMode() {
|
|
474
477
|
return this._hasExitedPlanMode;
|
|
475
478
|
}
|
|
@@ -552,11 +555,13 @@ var ModeController = class {
|
|
|
552
555
|
}
|
|
553
556
|
if (this._runnerMode === "task" && newMode === "building") {
|
|
554
557
|
this._mode = newMode;
|
|
558
|
+
this._isAuto = true;
|
|
555
559
|
this._hasExitedPlanMode = true;
|
|
556
560
|
return { type: "restart_query", newMode: "building" };
|
|
557
561
|
}
|
|
558
562
|
if (this._runnerMode === "task" && newMode === "auto") {
|
|
559
563
|
this._mode = newMode;
|
|
564
|
+
this._isAuto = true;
|
|
560
565
|
this._hasExitedPlanMode = true;
|
|
561
566
|
return { type: "restart_query", newMode: "auto" };
|
|
562
567
|
}
|
|
@@ -1293,7 +1298,7 @@ function truncateDescription(desc, maxChars) {
|
|
|
1293
1298
|
}
|
|
1294
1299
|
function formatTagWithContextPaths(tag) {
|
|
1295
1300
|
const desc = tag.description ? ` \u2014 ${tag.description}` : "";
|
|
1296
|
-
const lines = [`-
|
|
1301
|
+
const lines = [`- Name: "${tag.name}"${desc}`];
|
|
1297
1302
|
for (const link of tag.contextPaths ?? []) {
|
|
1298
1303
|
const label = link.label ? ` (${link.label})` : "";
|
|
1299
1304
|
lines.push(` \u2192 ${link.type}: ${link.path}${label}`);
|
|
@@ -1771,7 +1776,7 @@ function detectRelaunchScenario(context, trustChatHistory = false) {
|
|
|
1771
1776
|
const hasNewUserMessages = messagesAfterAgent.some((m) => m.role === "user");
|
|
1772
1777
|
return hasNewUserMessages ? "feedback_relaunch" : "idle_relaunch";
|
|
1773
1778
|
}
|
|
1774
|
-
function buildPmRelaunchParts(context, lastAgentIdx, isAuto) {
|
|
1779
|
+
function buildPmRelaunchParts(context, lastAgentIdx, isAuto, agentMode) {
|
|
1775
1780
|
const parts = [];
|
|
1776
1781
|
const newMessages = context.chatHistory.slice(lastAgentIdx + 1).filter((m) => m.role === "user");
|
|
1777
1782
|
if (newMessages.length > 0) {
|
|
@@ -1782,7 +1787,24 @@ function buildPmRelaunchParts(context, lastAgentIdx, isAuto) {
|
|
|
1782
1787
|
} else {
|
|
1783
1788
|
parts.push(`You have been relaunched. No new messages since your last session.`);
|
|
1784
1789
|
}
|
|
1785
|
-
if (
|
|
1790
|
+
if (agentMode === "building" || agentMode === "review") {
|
|
1791
|
+
parts.push(
|
|
1792
|
+
`
|
|
1793
|
+
Your plan has been approved. Begin implementing it now.`,
|
|
1794
|
+
`Work on the git branch "${context.githubBranch}". Stay on this branch \u2014 do not checkout or create other branches.`,
|
|
1795
|
+
`Start by reading the relevant source files mentioned in the plan, then write code.`,
|
|
1796
|
+
`When finished, use the mcp__conveyor__create_pull_request tool to open a PR. Do NOT use gh CLI.`
|
|
1797
|
+
);
|
|
1798
|
+
if (isAuto) {
|
|
1799
|
+
parts.push(
|
|
1800
|
+
`
|
|
1801
|
+
CRITICAL: You are in Auto mode. Do NOT report status, ask for confirmation, or go idle without making code changes.`,
|
|
1802
|
+
`Your FIRST action must be reading source files from the plan, then immediately writing code.`,
|
|
1803
|
+
`Do NOT summarize the plan or say "ready to implement" \u2014 start implementing.`,
|
|
1804
|
+
`If you are genuinely blocked, explain the specific blocker \u2014 do not go idle silently.`
|
|
1805
|
+
);
|
|
1806
|
+
}
|
|
1807
|
+
} else if (isAuto) {
|
|
1786
1808
|
if (context.plan?.trim()) {
|
|
1787
1809
|
parts.push(
|
|
1788
1810
|
`
|
|
@@ -1813,7 +1835,7 @@ function buildRelaunchWithSession(mode, context, agentMode, isAuto) {
|
|
|
1813
1835
|
const parts = [];
|
|
1814
1836
|
const lastAgentIdx = findLastAgentMessageIndex2(context.chatHistory);
|
|
1815
1837
|
if (mode === "pm") {
|
|
1816
|
-
parts.push(...buildPmRelaunchParts(context, lastAgentIdx, isAuto));
|
|
1838
|
+
parts.push(...buildPmRelaunchParts(context, lastAgentIdx, isAuto, agentMode));
|
|
1817
1839
|
} else if (scenario === "feedback_relaunch") {
|
|
1818
1840
|
const newMessages = context.chatHistory.slice(lastAgentIdx + 1).filter((m) => m.role === "user");
|
|
1819
1841
|
parts.push(
|
|
@@ -1842,7 +1864,7 @@ Address the requested changes. Do NOT re-investigate the codebase from scratch o
|
|
|
1842
1864
|
`Run \`git log --oneline -10\` to review what you already committed.`,
|
|
1843
1865
|
`Review the current state of the codebase and verify everything is working correctly.`
|
|
1844
1866
|
);
|
|
1845
|
-
if (agentMode === "auto" || agentMode === "building"
|
|
1867
|
+
if (agentMode === "auto" || agentMode === "building" || isAuto) {
|
|
1846
1868
|
parts.push(
|
|
1847
1869
|
`If work is incomplete, continue implementing the plan. When finished, commit, push, and use mcp__conveyor__create_pull_request to open a PR.`,
|
|
1848
1870
|
`Do NOT go idle or wait for instructions \u2014 you are in auto mode.`
|
|
@@ -2145,7 +2167,7 @@ function buildIdleRelaunchInstructions(context, isPm, agentMode, isAuto) {
|
|
|
2145
2167
|
`Wait for the team to provide instructions before taking action.`
|
|
2146
2168
|
];
|
|
2147
2169
|
}
|
|
2148
|
-
const isAutoMode = agentMode === "auto" || agentMode === "building"
|
|
2170
|
+
const isAutoMode = agentMode === "auto" || agentMode === "building" || isAuto;
|
|
2149
2171
|
const parts = [
|
|
2150
2172
|
`You were relaunched but no new instructions have been given since your last run.`,
|
|
2151
2173
|
`Work on the git branch "${context.githubBranch}". Stay on this branch \u2014 do not checkout or create other branches.`,
|
|
@@ -3067,17 +3089,17 @@ function buildDiscoveryTools(connection) {
|
|
|
3067
3089
|
{
|
|
3068
3090
|
title: z3.string().optional().describe("The new task title"),
|
|
3069
3091
|
storyPointValue: z3.number().optional().describe(SP_DESCRIPTION2),
|
|
3070
|
-
|
|
3092
|
+
tagNames: z3.array(z3.string()).optional().describe("Array of tag names to assign"),
|
|
3071
3093
|
githubPRUrl: z3.string().url().optional().describe("GitHub pull request URL to link to this task"),
|
|
3072
3094
|
githubBranch: z3.string().optional().describe("Set the GitHub branch name for this task (e.g. 'conveyor/my-feature-abc123')")
|
|
3073
3095
|
},
|
|
3074
|
-
async ({ title, storyPointValue,
|
|
3096
|
+
async ({ title, storyPointValue, tagNames, githubPRUrl, githubBranch }) => {
|
|
3075
3097
|
try {
|
|
3076
3098
|
await connection.call("updateTaskProperties", {
|
|
3077
3099
|
sessionId: connection.sessionId,
|
|
3078
3100
|
title,
|
|
3079
3101
|
storyPointValue,
|
|
3080
|
-
|
|
3102
|
+
tagNames,
|
|
3081
3103
|
githubPRUrl,
|
|
3082
3104
|
githubBranch
|
|
3083
3105
|
});
|
|
@@ -3085,7 +3107,7 @@ function buildDiscoveryTools(connection) {
|
|
|
3085
3107
|
if (title !== void 0) updatedFields.push(`title to "${title}"`);
|
|
3086
3108
|
if (storyPointValue !== void 0)
|
|
3087
3109
|
updatedFields.push(`story points to ${storyPointValue}`);
|
|
3088
|
-
if (
|
|
3110
|
+
if (tagNames !== void 0) updatedFields.push(`tags (${tagNames.length} tag(s))`);
|
|
3089
3111
|
if (githubPRUrl !== void 0) updatedFields.push(`PR link to "${githubPRUrl}"`);
|
|
3090
3112
|
if (githubBranch !== void 0) updatedFields.push(`branch to "${githubBranch}"`);
|
|
3091
3113
|
return textResult(`Task properties updated: ${updatedFields.join(", ")}`);
|
|
@@ -5151,7 +5173,7 @@ function buildQueryOptions(host, context) {
|
|
|
5151
5173
|
const systemPromptText = buildSystemPrompt(
|
|
5152
5174
|
host.config.mode,
|
|
5153
5175
|
context,
|
|
5154
|
-
host.config,
|
|
5176
|
+
{ ...host.config, isAuto: host.isAuto },
|
|
5155
5177
|
host.setupLog,
|
|
5156
5178
|
mode
|
|
5157
5179
|
);
|
|
@@ -5228,7 +5250,7 @@ async function buildFollowUpPrompt(host, context, followUpContent) {
|
|
|
5228
5250
|
const followUpImages = typeof followUpContent === "string" ? [] : followUpContent.filter(
|
|
5229
5251
|
(b) => b.type === "image"
|
|
5230
5252
|
);
|
|
5231
|
-
const textPrompt = isPmMode ? `${await buildInitialPrompt(host.config.mode, context, host.
|
|
5253
|
+
const textPrompt = isPmMode ? `${await buildInitialPrompt(host.config.mode, context, host.isAuto, host.agentMode)}
|
|
5232
5254
|
|
|
5233
5255
|
---
|
|
5234
5256
|
|
|
@@ -5277,12 +5299,7 @@ async function runSdkQuery(host, context, followUpContent) {
|
|
|
5277
5299
|
} else if (isDiscoveryLike) {
|
|
5278
5300
|
return;
|
|
5279
5301
|
} else {
|
|
5280
|
-
const initialPrompt = await buildInitialPrompt(
|
|
5281
|
-
host.config.mode,
|
|
5282
|
-
context,
|
|
5283
|
-
host.config.isAuto,
|
|
5284
|
-
mode
|
|
5285
|
-
);
|
|
5302
|
+
const initialPrompt = await buildInitialPrompt(host.config.mode, context, host.isAuto, mode);
|
|
5286
5303
|
const prompt = buildMultimodalPrompt(initialPrompt, context);
|
|
5287
5304
|
const agentQuery = host.harness.executeQuery({
|
|
5288
5305
|
prompt: host.createInputStream(prompt),
|
|
@@ -5307,7 +5324,7 @@ async function buildRetryQuery(host, context, options, lastErrorWasImage) {
|
|
|
5307
5324
|
);
|
|
5308
5325
|
}
|
|
5309
5326
|
const retryPrompt = buildMultimodalPrompt(
|
|
5310
|
-
await buildInitialPrompt(host.config.mode, context, host.
|
|
5327
|
+
await buildInitialPrompt(host.config.mode, context, host.isAuto, host.agentMode),
|
|
5311
5328
|
context,
|
|
5312
5329
|
lastErrorWasImage
|
|
5313
5330
|
);
|
|
@@ -5334,7 +5351,7 @@ async function handleAuthError(context, host, options) {
|
|
|
5334
5351
|
context.claudeSessionId = null;
|
|
5335
5352
|
host.connection.storeSessionId("");
|
|
5336
5353
|
const freshPrompt = buildMultimodalPrompt(
|
|
5337
|
-
await buildInitialPrompt(host.config.mode, context, host.
|
|
5354
|
+
await buildInitialPrompt(host.config.mode, context, host.isAuto, host.agentMode),
|
|
5338
5355
|
context
|
|
5339
5356
|
);
|
|
5340
5357
|
const freshQuery = host.harness.executeQuery({
|
|
@@ -5348,7 +5365,7 @@ async function handleStaleSession(context, host, options) {
|
|
|
5348
5365
|
context.claudeSessionId = null;
|
|
5349
5366
|
host.connection.storeSessionId("");
|
|
5350
5367
|
const freshPrompt = buildMultimodalPrompt(
|
|
5351
|
-
await buildInitialPrompt(host.config.mode, context, host.
|
|
5368
|
+
await buildInitialPrompt(host.config.mode, context, host.isAuto, host.agentMode),
|
|
5352
5369
|
context
|
|
5353
5370
|
);
|
|
5354
5371
|
const freshQuery = host.harness.executeQuery({
|
|
@@ -5598,6 +5615,9 @@ var QueryBridge = class {
|
|
|
5598
5615
|
get agentMode() {
|
|
5599
5616
|
return bridge.mode.effectiveMode;
|
|
5600
5617
|
},
|
|
5618
|
+
get isAuto() {
|
|
5619
|
+
return bridge.mode.isAuto;
|
|
5620
|
+
},
|
|
5601
5621
|
get isParentTask() {
|
|
5602
5622
|
return bridge._isParentTask;
|
|
5603
5623
|
},
|
|
@@ -6017,7 +6037,7 @@ var SessionRunner = class _SessionRunner {
|
|
|
6017
6037
|
// ── Auto-mode PR nudge ──────────────────────────────────────────────
|
|
6018
6038
|
static MAX_PR_NUDGES = 3;
|
|
6019
6039
|
needsPRNudge() {
|
|
6020
|
-
if (!this.
|
|
6040
|
+
if (!this.mode.isAuto || this.stopped) return false;
|
|
6021
6041
|
if (this.queryBridge?.wasRateLimited) return false;
|
|
6022
6042
|
if (this.prNudgeCount > _SessionRunner.MAX_PR_NUDGES) return false;
|
|
6023
6043
|
if (!this.taskContext) return false;
|
|
@@ -7295,7 +7315,7 @@ var ProjectRunner = class {
|
|
|
7295
7315
|
async handleAuditTasks(request) {
|
|
7296
7316
|
this.connection.emitStatus("busy");
|
|
7297
7317
|
try {
|
|
7298
|
-
const { handleTaskAudit } = await import("./task-audit-handler-
|
|
7318
|
+
const { handleTaskAudit } = await import("./task-audit-handler-6TZRN3YB.js");
|
|
7299
7319
|
await handleTaskAudit(request, this.connection, this.projectDir);
|
|
7300
7320
|
} catch (error) {
|
|
7301
7321
|
const msg = error instanceof Error ? error.message : String(error);
|
|
@@ -7740,4 +7760,4 @@ export {
|
|
|
7740
7760
|
loadForwardPorts,
|
|
7741
7761
|
loadConveyorConfig
|
|
7742
7762
|
};
|
|
7743
|
-
//# sourceMappingURL=chunk-
|
|
7763
|
+
//# sourceMappingURL=chunk-MFHMYUND.js.map
|