@rallycry/conveyor-agent 7.2.5 → 7.2.7
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-JFWVIDQ2.js → chunk-22S4PJT2.js} +48 -33
- package/dist/chunk-22S4PJT2.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-EWE52OL4.js +876 -0
- package/dist/task-audit-handler-EWE52OL4.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-JFWVIDQ2.js.map +0 -1
- package/dist/task-audit-handler-7Q7EJENK.js +0 -584
- package/dist/task-audit-handler-7Q7EJENK.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
|
}
|
|
@@ -1300,10 +1305,6 @@ function formatTagWithContextPaths(tag) {
|
|
|
1300
1305
|
}
|
|
1301
1306
|
return lines;
|
|
1302
1307
|
}
|
|
1303
|
-
function formatTagNameOnly(tag) {
|
|
1304
|
-
const desc = tag.description ? ` \u2014 ${tag.description}` : "";
|
|
1305
|
-
return `- Name: "${tag.name}"${desc}`;
|
|
1306
|
-
}
|
|
1307
1308
|
function buildPropertyInstructions(context, runnerMode) {
|
|
1308
1309
|
const isTask = runnerMode === "task";
|
|
1309
1310
|
const parts = [];
|
|
@@ -1335,11 +1336,22 @@ function buildPropertyInstructions(context, runnerMode) {
|
|
|
1335
1336
|
}
|
|
1336
1337
|
if (!isTask && unassigned.length > 0) {
|
|
1337
1338
|
parts.push(``, `Available project tags:`);
|
|
1338
|
-
for (const tag of unassigned) parts.push(
|
|
1339
|
+
for (const tag of unassigned) parts.push(...formatTagWithContextPaths(tag));
|
|
1339
1340
|
}
|
|
1340
1341
|
}
|
|
1341
1342
|
return parts;
|
|
1342
1343
|
}
|
|
1344
|
+
function buildExplorationMethodology() {
|
|
1345
|
+
return [
|
|
1346
|
+
``,
|
|
1347
|
+
`### Exploration Methodology`,
|
|
1348
|
+
`Investigate efficiently \u2014 do not read files aimlessly:`,
|
|
1349
|
+
`- Search first, read second: use grep/glob to locate relevant code, then read only the files that matter`,
|
|
1350
|
+
`- Never re-read a file already in your context \u2014 you have a large context window, scroll up instead`,
|
|
1351
|
+
`- Start with 3-5 critical files, form a hypothesis about the approach, then validate with targeted reads`,
|
|
1352
|
+
`- Stop exploring when you can write specific file paths and function names in your plan \u2014 that's enough`
|
|
1353
|
+
];
|
|
1354
|
+
}
|
|
1343
1355
|
function buildDiscoveryPrompt(context, runnerMode) {
|
|
1344
1356
|
const parts = [
|
|
1345
1357
|
`
|
|
@@ -1356,11 +1368,12 @@ function buildDiscoveryPrompt(context, runnerMode) {
|
|
|
1356
1368
|
`### Planning Checklist (complete ALL before calling ExitPlanMode)`,
|
|
1357
1369
|
`Your PRIMARY goal is to create a thorough plan. Complete these steps in order:`,
|
|
1358
1370
|
`1. Read the task description and chat history \u2014 respond to what's been discussed`,
|
|
1359
|
-
`2.
|
|
1371
|
+
`2. Investigate the codebase using the methodology below \u2014 search first, read targeted files`,
|
|
1360
1372
|
`3. Save a detailed plan via \`update_task\``,
|
|
1361
1373
|
`4. Set story points, tags, and title via \`update_task_properties\` (icon is set automatically)`,
|
|
1362
1374
|
`5. Discuss the plan with the team if they're engaged, incorporate feedback`,
|
|
1363
1375
|
`6. THEN call ExitPlanMode \u2014 it is the LAST step, not the first`,
|
|
1376
|
+
...buildExplorationMethodology(),
|
|
1364
1377
|
``,
|
|
1365
1378
|
`### Self-Identification Tools`,
|
|
1366
1379
|
`Use these MCP tools to set your own task properties:`,
|
|
@@ -1443,7 +1456,7 @@ function buildAutoPrompt(context, runnerMode) {
|
|
|
1443
1456
|
`### Autonomous Guidelines:`,
|
|
1444
1457
|
`- Make decisions independently \u2014 do not ask the team for approval at each step`,
|
|
1445
1458
|
`- Only escalate when genuinely blocked (ambiguous requirements, missing access, conflicting instructions)`,
|
|
1446
|
-
`-
|
|
1459
|
+
`- Investigate efficiently: search (grep/glob) to locate code, read only critical files, form a hypothesis, validate, then plan`
|
|
1447
1460
|
];
|
|
1448
1461
|
if (context) parts.push(...buildPropertyInstructions(context, runnerMode));
|
|
1449
1462
|
return parts.join("\n");
|
|
@@ -1585,7 +1598,7 @@ function buildPmPreamble(context) {
|
|
|
1585
1598
|
const parts = [
|
|
1586
1599
|
`You are an AI project manager helping to plan tasks for the "${context.title}" project.`,
|
|
1587
1600
|
`You are running locally with full access to the repository.`,
|
|
1588
|
-
`You can
|
|
1601
|
+
`You can search code (grep, glob), read files, and run shell commands (e.g. git log, git diff). Search to locate relevant code before reading files. You cannot write or edit files.`,
|
|
1589
1602
|
`
|
|
1590
1603
|
Environment (ready, no setup required):`,
|
|
1591
1604
|
`- Repository is cloned at your current working directory.`,
|
|
@@ -1782,21 +1795,25 @@ function buildPmRelaunchParts(context, lastAgentIdx, isAuto, agentMode) {
|
|
|
1782
1795
|
} else {
|
|
1783
1796
|
parts.push(`You have been relaunched. No new messages since your last session.`);
|
|
1784
1797
|
}
|
|
1785
|
-
if (
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
`
|
|
1798
|
+
if (agentMode === "building" || agentMode === "review") {
|
|
1799
|
+
parts.push(
|
|
1800
|
+
`
|
|
1789
1801
|
Your plan has been approved. Begin implementing it now.`,
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1802
|
+
`Work on the git branch "${context.githubBranch}". Stay on this branch \u2014 do not checkout or create other branches.`,
|
|
1803
|
+
`Start by reading the relevant source files mentioned in the plan, then write code.`,
|
|
1804
|
+
`When finished, use the mcp__conveyor__create_pull_request tool to open a PR. Do NOT use gh CLI.`
|
|
1805
|
+
);
|
|
1806
|
+
if (isAuto) {
|
|
1807
|
+
parts.push(
|
|
1793
1808
|
`
|
|
1794
1809
|
CRITICAL: You are in Auto mode. Do NOT report status, ask for confirmation, or go idle without making code changes.`,
|
|
1795
1810
|
`Your FIRST action must be reading source files from the plan, then immediately writing code.`,
|
|
1796
1811
|
`Do NOT summarize the plan or say "ready to implement" \u2014 start implementing.`,
|
|
1797
1812
|
`If you are genuinely blocked, explain the specific blocker \u2014 do not go idle silently.`
|
|
1798
1813
|
);
|
|
1799
|
-
}
|
|
1814
|
+
}
|
|
1815
|
+
} else if (isAuto) {
|
|
1816
|
+
if (context.plan?.trim()) {
|
|
1800
1817
|
parts.push(
|
|
1801
1818
|
`
|
|
1802
1819
|
You are in auto mode. A plan already exists for this task.`,
|
|
@@ -1855,7 +1872,7 @@ Address the requested changes. Do NOT re-investigate the codebase from scratch o
|
|
|
1855
1872
|
`Run \`git log --oneline -10\` to review what you already committed.`,
|
|
1856
1873
|
`Review the current state of the codebase and verify everything is working correctly.`
|
|
1857
1874
|
);
|
|
1858
|
-
if (agentMode === "auto" || agentMode === "building"
|
|
1875
|
+
if (agentMode === "auto" || agentMode === "building" || isAuto) {
|
|
1859
1876
|
parts.push(
|
|
1860
1877
|
`If work is incomplete, continue implementing the plan. When finished, commit, push, and use mcp__conveyor__create_pull_request to open a PR.`,
|
|
1861
1878
|
`Do NOT go idle or wait for instructions \u2014 you are in auto mode.`
|
|
@@ -2058,7 +2075,7 @@ CRITICAL: You are in Auto mode. Do NOT report status, ask for confirmation, or g
|
|
|
2058
2075
|
}
|
|
2059
2076
|
return [
|
|
2060
2077
|
`You are operating autonomously. Begin planning immediately.`,
|
|
2061
|
-
`1.
|
|
2078
|
+
`1. Search the codebase (grep/glob) to locate relevant files, then read the critical ones`,
|
|
2062
2079
|
`2. Draft a clear implementation plan and save it with update_task`,
|
|
2063
2080
|
`3. Set story points, tags, and title (update_task_properties)`,
|
|
2064
2081
|
`4. When the plan and all required properties are set, call ExitPlanMode to transition to building`,
|
|
@@ -2158,7 +2175,7 @@ function buildIdleRelaunchInstructions(context, isPm, agentMode, isAuto) {
|
|
|
2158
2175
|
`Wait for the team to provide instructions before taking action.`
|
|
2159
2176
|
];
|
|
2160
2177
|
}
|
|
2161
|
-
const isAutoMode = agentMode === "auto" || agentMode === "building"
|
|
2178
|
+
const isAutoMode = agentMode === "auto" || agentMode === "building" || isAuto;
|
|
2162
2179
|
const parts = [
|
|
2163
2180
|
`You were relaunched but no new instructions have been given since your last run.`,
|
|
2164
2181
|
`Work on the git branch "${context.githubBranch}". Stay on this branch \u2014 do not checkout or create other branches.`,
|
|
@@ -5164,7 +5181,7 @@ function buildQueryOptions(host, context) {
|
|
|
5164
5181
|
const systemPromptText = buildSystemPrompt(
|
|
5165
5182
|
host.config.mode,
|
|
5166
5183
|
context,
|
|
5167
|
-
host.config,
|
|
5184
|
+
{ ...host.config, isAuto: host.isAuto },
|
|
5168
5185
|
host.setupLog,
|
|
5169
5186
|
mode
|
|
5170
5187
|
);
|
|
@@ -5241,7 +5258,7 @@ async function buildFollowUpPrompt(host, context, followUpContent) {
|
|
|
5241
5258
|
const followUpImages = typeof followUpContent === "string" ? [] : followUpContent.filter(
|
|
5242
5259
|
(b) => b.type === "image"
|
|
5243
5260
|
);
|
|
5244
|
-
const textPrompt = isPmMode ? `${await buildInitialPrompt(host.config.mode, context, host.
|
|
5261
|
+
const textPrompt = isPmMode ? `${await buildInitialPrompt(host.config.mode, context, host.isAuto, host.agentMode)}
|
|
5245
5262
|
|
|
5246
5263
|
---
|
|
5247
5264
|
|
|
@@ -5290,12 +5307,7 @@ async function runSdkQuery(host, context, followUpContent) {
|
|
|
5290
5307
|
} else if (isDiscoveryLike) {
|
|
5291
5308
|
return;
|
|
5292
5309
|
} else {
|
|
5293
|
-
const initialPrompt = await buildInitialPrompt(
|
|
5294
|
-
host.config.mode,
|
|
5295
|
-
context,
|
|
5296
|
-
host.config.isAuto,
|
|
5297
|
-
mode
|
|
5298
|
-
);
|
|
5310
|
+
const initialPrompt = await buildInitialPrompt(host.config.mode, context, host.isAuto, mode);
|
|
5299
5311
|
const prompt = buildMultimodalPrompt(initialPrompt, context);
|
|
5300
5312
|
const agentQuery = host.harness.executeQuery({
|
|
5301
5313
|
prompt: host.createInputStream(prompt),
|
|
@@ -5320,7 +5332,7 @@ async function buildRetryQuery(host, context, options, lastErrorWasImage) {
|
|
|
5320
5332
|
);
|
|
5321
5333
|
}
|
|
5322
5334
|
const retryPrompt = buildMultimodalPrompt(
|
|
5323
|
-
await buildInitialPrompt(host.config.mode, context, host.
|
|
5335
|
+
await buildInitialPrompt(host.config.mode, context, host.isAuto, host.agentMode),
|
|
5324
5336
|
context,
|
|
5325
5337
|
lastErrorWasImage
|
|
5326
5338
|
);
|
|
@@ -5347,7 +5359,7 @@ async function handleAuthError(context, host, options) {
|
|
|
5347
5359
|
context.claudeSessionId = null;
|
|
5348
5360
|
host.connection.storeSessionId("");
|
|
5349
5361
|
const freshPrompt = buildMultimodalPrompt(
|
|
5350
|
-
await buildInitialPrompt(host.config.mode, context, host.
|
|
5362
|
+
await buildInitialPrompt(host.config.mode, context, host.isAuto, host.agentMode),
|
|
5351
5363
|
context
|
|
5352
5364
|
);
|
|
5353
5365
|
const freshQuery = host.harness.executeQuery({
|
|
@@ -5361,7 +5373,7 @@ async function handleStaleSession(context, host, options) {
|
|
|
5361
5373
|
context.claudeSessionId = null;
|
|
5362
5374
|
host.connection.storeSessionId("");
|
|
5363
5375
|
const freshPrompt = buildMultimodalPrompt(
|
|
5364
|
-
await buildInitialPrompt(host.config.mode, context, host.
|
|
5376
|
+
await buildInitialPrompt(host.config.mode, context, host.isAuto, host.agentMode),
|
|
5365
5377
|
context
|
|
5366
5378
|
);
|
|
5367
5379
|
const freshQuery = host.harness.executeQuery({
|
|
@@ -5611,6 +5623,9 @@ var QueryBridge = class {
|
|
|
5611
5623
|
get agentMode() {
|
|
5612
5624
|
return bridge.mode.effectiveMode;
|
|
5613
5625
|
},
|
|
5626
|
+
get isAuto() {
|
|
5627
|
+
return bridge.mode.isAuto;
|
|
5628
|
+
},
|
|
5614
5629
|
get isParentTask() {
|
|
5615
5630
|
return bridge._isParentTask;
|
|
5616
5631
|
},
|
|
@@ -6030,7 +6045,7 @@ var SessionRunner = class _SessionRunner {
|
|
|
6030
6045
|
// ── Auto-mode PR nudge ──────────────────────────────────────────────
|
|
6031
6046
|
static MAX_PR_NUDGES = 3;
|
|
6032
6047
|
needsPRNudge() {
|
|
6033
|
-
if (!this.
|
|
6048
|
+
if (!this.mode.isAuto || this.stopped) return false;
|
|
6034
6049
|
if (this.queryBridge?.wasRateLimited) return false;
|
|
6035
6050
|
if (this.prNudgeCount > _SessionRunner.MAX_PR_NUDGES) return false;
|
|
6036
6051
|
if (!this.taskContext) return false;
|
|
@@ -7308,7 +7323,7 @@ var ProjectRunner = class {
|
|
|
7308
7323
|
async handleAuditTasks(request) {
|
|
7309
7324
|
this.connection.emitStatus("busy");
|
|
7310
7325
|
try {
|
|
7311
|
-
const { handleTaskAudit } = await import("./task-audit-handler-
|
|
7326
|
+
const { handleTaskAudit } = await import("./task-audit-handler-EWE52OL4.js");
|
|
7312
7327
|
await handleTaskAudit(request, this.connection, this.projectDir);
|
|
7313
7328
|
} catch (error) {
|
|
7314
7329
|
const msg = error instanceof Error ? error.message : String(error);
|
|
@@ -7753,4 +7768,4 @@ export {
|
|
|
7753
7768
|
loadForwardPorts,
|
|
7754
7769
|
loadConveyorConfig
|
|
7755
7770
|
};
|
|
7756
|
-
//# sourceMappingURL=chunk-
|
|
7771
|
+
//# sourceMappingURL=chunk-22S4PJT2.js.map
|